@oneuptime/common 14.0.109 → 14.0.110
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/SecurityEvent.js +1 -1
- package/Models/DatabaseModels/AIInsight.js +2 -2
- package/Models/DatabaseModels/Alert.js +2 -2
- package/Models/DatabaseModels/AlertEpisode.js +2 -2
- package/Models/DatabaseModels/AlertEpisodeOnCallRule.js +3 -3
- package/Models/DatabaseModels/AlertGroupingRule.d.mts +1 -0
- package/Models/DatabaseModels/AlertGroupingRule.d.ts +1 -0
- package/Models/DatabaseModels/AlertGroupingRule.js +48 -2
- package/Models/DatabaseModels/AlertOnCallRule.js +3 -3
- package/Models/DatabaseModels/AlertSeverity.js +13 -4
- package/Models/DatabaseModels/AlertState.js +1 -1
- package/Models/DatabaseModels/CallLog.js +12 -12
- package/Models/DatabaseModels/DatabaseBaseModel/DatabaseBaseModel.d.mts +2 -0
- package/Models/DatabaseModels/DatabaseBaseModel/DatabaseBaseModel.d.ts +2 -0
- package/Models/DatabaseModels/EmailLog.js +12 -12
- package/Models/DatabaseModels/FormSubmission.js +2 -2
- package/Models/DatabaseModels/GlobalConfig.d.mts +1 -0
- package/Models/DatabaseModels/GlobalConfig.d.ts +1 -0
- package/Models/DatabaseModels/GlobalConfig.js +28 -0
- package/Models/DatabaseModels/Incident.js +2 -2
- package/Models/DatabaseModels/IncidentEpisode.js +2 -2
- package/Models/DatabaseModels/IncidentEpisodeOnCallRule.js +3 -3
- package/Models/DatabaseModels/IncidentGroupingRule.d.mts +1 -0
- package/Models/DatabaseModels/IncidentGroupingRule.d.ts +1 -0
- package/Models/DatabaseModels/IncidentGroupingRule.js +48 -2
- package/Models/DatabaseModels/IncidentOnCallRule.js +3 -3
- package/Models/DatabaseModels/IncidentSeverity.js +13 -4
- package/Models/DatabaseModels/IncidentState.js +1 -1
- package/Models/DatabaseModels/IncidentTemplate.js +2 -2
- package/Models/DatabaseModels/Monitor.js +3 -3
- package/Models/DatabaseModels/NetworkDevice.d.mts +1 -0
- package/Models/DatabaseModels/NetworkDevice.d.ts +1 -0
- package/Models/DatabaseModels/NetworkDevice.js +41 -0
- package/Models/DatabaseModels/OnCallDutyPolicy.js +4 -2
- package/Models/DatabaseModels/OnCallDutyPolicyEscalationRule.js +1 -1
- package/Models/DatabaseModels/OnCallDutyPolicyEscalationRuleSchedule.js +8 -5
- package/Models/DatabaseModels/OnCallDutyPolicyEscalationRuleTeam.js +5 -2
- package/Models/DatabaseModels/OnCallDutyPolicyEscalationRuleUser.js +5 -2
- package/Models/DatabaseModels/OnCallDutyPolicyExecutionLog.js +9 -6
- package/Models/DatabaseModels/OnCallDutyPolicyExecutionLogTimeline.js +10 -7
- package/Models/DatabaseModels/OnCallDutyPolicyFeed.js +14 -11
- package/Models/DatabaseModels/OnCallDutyPolicyOwnerTeam.js +7 -4
- package/Models/DatabaseModels/OnCallDutyPolicyOwnerUser.js +7 -4
- package/Models/DatabaseModels/OnCallDutyPolicySchedule.js +6 -3
- package/Models/DatabaseModels/OnCallDutyPolicyScheduleCalendarFeed.js +4 -4
- package/Models/DatabaseModels/OnCallDutyPolicyScheduleLayer.js +3 -3
- package/Models/DatabaseModels/OnCallDutyPolicyScheduleLayerUser.js +6 -6
- package/Models/DatabaseModels/OnCallDutyPolicyTimeLog.js +9 -6
- package/Models/DatabaseModels/Project.d.mts +2 -0
- package/Models/DatabaseModels/Project.d.ts +2 -0
- package/Models/DatabaseModels/Project.js +96 -2
- package/Models/DatabaseModels/ProxmoxCluster.d.mts +1 -0
- package/Models/DatabaseModels/ProxmoxCluster.d.ts +1 -0
- package/Models/DatabaseModels/ProxmoxCluster.js +52 -3
- package/Models/DatabaseModels/PushNotificationLog.js +12 -12
- package/Models/DatabaseModels/Reseller.js +8 -2
- package/Models/DatabaseModels/ResellerPlan.js +8 -2
- package/Models/DatabaseModels/ScheduledMaintenance.js +6 -3
- package/Models/DatabaseModels/ScheduledMaintenanceInternalNote.js +7 -4
- package/Models/DatabaseModels/ScheduledMaintenanceMeasurementValue.js +2 -2
- package/Models/DatabaseModels/ScheduledMaintenancePublicNote.js +7 -4
- package/Models/DatabaseModels/ScheduledMaintenanceStateTimeline.js +1 -1
- package/Models/DatabaseModels/Service.js +1 -1
- package/Models/DatabaseModels/ServiceLevelObjectiveBurnRateRule.js +4 -4
- package/Models/DatabaseModels/ServiceLevelObjectiveErrorBudgetPolicyTier.js +4 -4
- package/Models/DatabaseModels/SmsLog.js +12 -12
- package/Models/DatabaseModels/StatusPage.js +5 -5
- package/Models/DatabaseModels/StatusPageSubscriber.js +2 -2
- package/Models/DatabaseModels/TelegramLog.js +12 -12
- package/Models/DatabaseModels/TelemetryIngestionKey.js +8 -5
- package/Models/DatabaseModels/TelemetryIngestionKeyRefusal.js +7 -4
- package/Models/DatabaseModels/User.d.mts +4 -0
- package/Models/DatabaseModels/User.d.ts +4 -0
- package/Models/DatabaseModels/User.js +100 -0
- package/Models/DatabaseModels/UserOnCallLog.js +6 -6
- package/Models/DatabaseModels/UserOnCallLogTimeline.js +3 -3
- package/Models/DatabaseModels/UserOnCallShiftReminderLog.js +2 -2
- package/Models/DatabaseModels/WebhookLog.js +12 -12
- package/Models/DatabaseModels/WhatsAppLog.js +12 -12
- package/Models/DatabaseModels/WorkspaceNotificationLog.js +12 -12
- package/Types/AI/AIChatTypes.d.mts +2 -1
- package/Types/AI/AIChatTypes.d.ts +2 -1
- package/Types/AI/AIChatTypes.js +5 -0
- package/Types/Analytics/ProductEvent.d.mts +6 -1
- package/Types/Analytics/ProductEvent.d.ts +6 -1
- package/Types/Analytics/ProductEvent.js +41 -0
- package/Types/AuditLog/AuditLogCoverage.d.mts +1 -0
- package/Types/AuditLog/AuditLogCoverage.d.ts +1 -0
- package/Types/AuditLog/AuditLogCoverage.js +4 -2
- package/Types/Cloud/CloudResourceCatalog.d.mts +2 -0
- package/Types/Cloud/CloudResourceCatalog.d.ts +2 -0
- package/Types/Cloud/CloudResourceCatalog.js +33 -3
- package/Types/Cloud/CloudResourceCatalog.mjs +1 -0
- package/Types/DataObservability/DataCheckSuggestions.d.mts +25 -0
- package/Types/DataObservability/DataCheckSuggestions.d.ts +25 -0
- package/Types/DataObservability/DataCheckSuggestions.js +102 -65
- package/Types/DataObservability/DataCheckSuggestions.mjs +1 -0
- package/Types/Database/TableMetadata.d.mts +2 -0
- package/Types/Database/TableMetadata.d.ts +2 -0
- package/Types/Database/TableMetadata.js +6 -0
- package/Types/Date.d.mts +20 -1
- package/Types/Date.d.ts +20 -1
- package/Types/Date.js +42 -2
- package/Types/DateLanguage.d.mts +2 -0
- package/Types/DateLanguage.d.ts +2 -0
- package/Types/DateLanguage.js +44 -2
- package/Types/DateLanguage.mjs +2 -0
- package/Types/DirectionArrow.d.mts +7 -0
- package/Types/DirectionArrow.d.ts +7 -0
- package/Types/DirectionArrow.js +88 -0
- package/Types/DirectionArrow.mjs +7 -0
- package/Types/Docs/GlossaryTerm.d.mts +1 -0
- package/Types/Docs/GlossaryTerm.d.ts +1 -0
- package/Types/Docs/GlossaryTerm.js +2 -0
- package/Types/Docs/RetiredNames.d.mts +11 -0
- package/Types/Docs/RetiredNames.d.ts +11 -0
- package/Types/Docs/RetiredNames.js +139 -0
- package/Types/Docs/RetiredNames.mjs +3 -0
- package/Types/Exception/RefusalWithValues.d.mts +7 -0
- package/Types/Exception/RefusalWithValues.d.ts +7 -0
- package/Types/Exception/RefusalWithValues.js +76 -0
- package/Types/Exception/RefusalWithValues.mjs +3 -0
- package/Types/Exception/UnexplainedError.d.mts +13 -0
- package/Types/Exception/UnexplainedError.d.ts +13 -0
- package/Types/Exception/UnexplainedError.js +53 -1
- package/Types/Exception/UnexplainedError.mjs +1 -0
- package/Types/File/FileSize.d.mts +4 -1
- package/Types/File/FileSize.d.ts +4 -1
- package/Types/File/FileSize.js +18 -17
- package/Types/HostCollector/HostCollector.d.mts +1 -0
- package/Types/HostCollector/HostCollector.d.ts +1 -0
- package/Types/HostCollector/HostCollector.js +26 -10
- package/Types/HostCollector/HostCollector.mjs +1 -0
- package/Types/Monitor/MonitorCriteria.js +2 -2
- package/Types/Monitor/MonitorStep.js +1 -1
- package/Types/Monitor/MonitorTemplateSyncField.d.mts +6 -0
- package/Types/Monitor/MonitorTemplateSyncField.d.ts +6 -0
- package/Types/Monitor/MonitorTemplateSyncField.js +106 -64
- package/Types/Monitor/NtpMonitor/NtpMonitorUtil.d.mts +1 -0
- package/Types/Monitor/NtpMonitor/NtpMonitorUtil.d.ts +1 -0
- package/Types/Monitor/NtpMonitor/NtpMonitorUtil.js +11 -3
- package/Types/Monitor/WhoIsTold.d.mts +3 -1
- package/Types/Monitor/WhoIsTold.d.ts +3 -1
- package/Types/Monitor/WhoIsTold.js +2 -1
- package/Types/NotificationRule/PagingLadder.d.mts +137 -0
- package/Types/NotificationRule/PagingLadder.d.ts +137 -0
- package/Types/NotificationRule/PagingLadder.js +682 -0
- package/Types/NotificationRule/PagingLadder.mjs +28 -0
- package/Types/NotificationSetting/NotificationEmailRollupCategory.js +1 -1
- package/Types/OnCallDutyPolicy/OnCallPageLine.d.mts +26 -0
- package/Types/OnCallDutyPolicy/OnCallPageLine.d.ts +26 -0
- package/Types/OnCallDutyPolicy/OnCallPageLine.js +136 -0
- package/Types/OnCallDutyPolicy/OnCallPageLine.mjs +18 -0
- package/Types/OnCallDutyPolicy/OnCallTestPage.d.mts +44 -0
- package/Types/OnCallDutyPolicy/OnCallTestPage.d.ts +44 -0
- package/Types/OnCallDutyPolicy/OnCallTestPage.js +96 -5
- package/Types/OnCallDutyPolicy/OnCallTestPage.mjs +1 -0
- package/Types/OnCallDutyPolicy/OnCallTestPageLine.d.mts +19 -0
- package/Types/OnCallDutyPolicy/OnCallTestPageLine.d.ts +19 -0
- package/Types/OnCallDutyPolicy/OnCallTestPageLine.js +222 -0
- package/Types/OnCallDutyPolicy/OnCallTestPageLine.mjs +6 -0
- package/Types/OnCallDutyPolicy/ScheduleLayerDefaults.js +5 -2
- package/Types/OnCallDutyPolicy/UserOverrideCoverRequest.js +9 -1
- package/Types/Permission.d.mts +2 -2
- package/Types/Permission.d.ts +2 -2
- package/Types/Permission.js +194 -193
- package/Types/Product/ProductCatalog.d.mts +10 -0
- package/Types/Product/ProductCatalog.d.ts +10 -0
- package/Types/Product/ProductCatalog.js +208 -0
- package/Types/Product/ProductCatalog.mjs +6 -0
- package/Types/Product/ProductOfTable.d.mts +3 -0
- package/Types/Product/ProductOfTable.d.ts +3 -0
- package/Types/Product/ProductOfTable.js +68 -0
- package/Types/Product/ProductOfTable.mjs +3 -0
- package/Types/Product/ProjectProductsAnswer.d.mts +3 -0
- package/Types/Product/ProjectProductsAnswer.d.ts +3 -0
- package/Types/Product/ProjectProductsAnswer.js +35 -2
- package/Types/Product/ProjectProductsAnswer.mjs +1 -0
- package/Types/Product/ServerProducts.d.mts +65 -0
- package/Types/Product/ServerProducts.d.ts +65 -0
- package/Types/Product/ServerProducts.js +383 -0
- package/Types/Product/ServerProducts.mjs +26 -0
- package/Types/Product/ServerProductsAnswer.d.mts +21 -0
- package/Types/Product/ServerProductsAnswer.d.ts +21 -0
- package/Types/Product/ServerProductsAnswer.js +78 -0
- package/Types/Product/ServerProductsAnswer.mjs +5 -0
- package/Types/ProductFeedback/ProductFeedback.d.mts +3 -1
- package/Types/ProductFeedback/ProductFeedback.d.ts +3 -1
- package/Types/ProductFeedback/ProductFeedback.js +8 -0
- package/Types/Rum/SessionReplayCustomEvents.d.mts +1 -0
- package/Types/Rum/SessionReplayCustomEvents.d.ts +1 -0
- package/Types/SampleProject/SampleProject.d.mts +54 -0
- package/Types/SampleProject/SampleProject.d.ts +54 -0
- package/Types/SampleProject/SampleProject.js +177 -0
- package/Types/SampleProject/SampleProject.mjs +22 -0
- package/Types/SampleProject/SampleProjectContent.d.mts +127 -0
- package/Types/SampleProject/SampleProjectContent.d.ts +127 -0
- package/Types/SampleProject/SampleProjectContent.js +397 -0
- package/Types/SampleProject/SampleProjectContent.mjs +18 -0
- package/Types/Telemetry/TelemetryIngestSurface.js +6 -5
- package/Types/Translator.d.mts +1 -0
- package/Types/Translator.d.ts +1 -0
- package/Types/Translator.js +40 -2
- package/Types/Translator.mjs +1 -0
- package/Types/UsedBy/UsedBy.d.mts +103 -0
- package/Types/UsedBy/UsedBy.d.ts +103 -0
- package/Types/UsedBy/UsedBy.js +389 -0
- package/Types/UsedBy/UsedBy.mjs +20 -0
- package/Types/UsedBy/UsedByServerProducts.d.mts +4 -0
- package/Types/UsedBy/UsedByServerProducts.d.ts +4 -0
- package/Types/UsedBy/UsedByServerProducts.js +48 -0
- package/Types/UsedBy/UsedByServerProducts.mjs +3 -0
- package/Types/WelcomeChecklist/WelcomeChecklist.d.mts +6 -0
- package/Types/WelcomeChecklist/WelcomeChecklist.d.ts +6 -0
- package/Types/WelcomeChecklist/WelcomeChecklist.js +54 -2
- package/Types/WelcomeChecklist/WelcomeChecklist.mjs +4 -0
- package/Types/WelcomeChecklist/WelcomeChecklistAnswer.d.mts +1 -0
- package/Types/WelcomeChecklist/WelcomeChecklistAnswer.d.ts +1 -0
- package/Types/WelcomeChecklist/WelcomeChecklistAnswer.js +3 -0
- package/Types/Workflow/PassedOnFields.js +2 -1
- package/Types/Workflow/Templates.js +1 -1
- package/Types/Workspace/NotificationRules/NotificationRuleCondition.d.mts +2 -0
- package/Types/Workspace/NotificationRules/NotificationRuleCondition.d.ts +2 -0
- package/Utils/AI/MeaningMatch.d.mts +36 -0
- package/Utils/AI/MeaningMatch.d.ts +36 -0
- package/Utils/AI/MeaningMatch.js +535 -0
- package/Utils/AI/MeaningMatch.mjs +7 -0
- package/Utils/ArchivableValues.js +1 -1
- package/Utils/AuditLog/AuditLogValues.js +2 -2
- package/Utils/Dashboard/ClockWidgetFormat.d.mts +14 -2
- package/Utils/Dashboard/ClockWidgetFormat.d.ts +14 -2
- package/Utils/Dashboard/ClockWidgetFormat.js +105 -2
- package/Utils/Dashboard/DashboardViewConfigSignature.d.mts +3 -0
- package/Utils/Dashboard/DashboardViewConfigSignature.d.ts +3 -0
- package/Utils/Dashboard/DashboardViewConfigSignature.js +45 -0
- package/Utils/Dashboard/DashboardViewConfigSignature.mjs +3 -0
- package/Utils/DataSecurity/TextScanner.js +2 -2
- package/Utils/DeveloperDocs/AiAssistantExamples.js +4 -4
- package/Utils/DeveloperDocs/CliCommands.d.mts +1 -0
- package/Utils/DeveloperDocs/CliCommands.d.ts +1 -0
- package/Utils/DeveloperDocs/CliCommands.js +2 -1
- package/Utils/DeveloperDocs/CliResources.js +2 -1
- package/Utils/DeveloperDocs/TerraformSchema.js +3 -1
- package/Utils/Markdown/LinkReferenceDefinitions.d.mts +8 -0
- package/Utils/Markdown/LinkReferenceDefinitions.d.ts +8 -0
- package/Utils/Markdown/LinkReferenceDefinitions.js +1493 -131
- package/Utils/Markdown/LinkReferenceDefinitions.mjs +1 -0
- package/Utils/Markdown/MarkdownTableCell.js +2 -1
- package/Utils/Markdown/OverLongText.js +523 -5
- package/Utils/Markdown/SlowMarkdown.d.mts +14 -0
- package/Utils/Markdown/SlowMarkdown.d.ts +14 -0
- package/Utils/Markdown/SlowMarkdown.js +595 -11
- package/Utils/Markdown/SlowMarkdown.mjs +6 -0
- package/Utils/ModelApiName.d.mts +11 -0
- package/Utils/ModelApiName.d.ts +11 -0
- package/Utils/ModelApiName.js +72 -0
- package/Utils/ModelApiName.mjs +5 -0
- package/Utils/Monitor/DeviceMacLearningUtil.d.mts +2 -1
- package/Utils/Monitor/DeviceMacLearningUtil.d.ts +2 -1
- package/Utils/Monitor/DeviceMacLearningUtil.js +26 -0
- package/Utils/Monitor/EndpointAttachmentUtil.js +8 -3
- package/Utils/Monitor/ExternalStatusPageReading.d.mts +3 -0
- package/Utils/Monitor/ExternalStatusPageReading.d.ts +3 -0
- package/Utils/Monitor/ExternalStatusPageReading.js +35 -1
- package/Utils/Monitor/ExternalStatusPageReading.mjs +2 -0
- package/Utils/Monitor/MonitorTemplateLinkRefusal.d.mts +9 -0
- package/Utils/Monitor/MonitorTemplateLinkRefusal.d.ts +9 -0
- package/Utils/Monitor/MonitorTemplateLinkRefusal.js +45 -0
- package/Utils/Monitor/MonitorTemplateLinkRefusal.mjs +6 -0
- package/Utils/OpenStack/OpenStackCheckName.js +2 -1
- package/Utils/OpenStack/OpenStackLogScrub.js +1 -1
- package/Utils/OpenStack/OpenStackLogs.js +3 -2
- package/Utils/OpenStack/OpenStackTraces.js +2 -1
- package/Utils/Project/NotificationChannels.js +5 -5
- package/Utils/Project/ProjectBalance.js +2 -2
- package/Utils/Project/TwilioAccount.js +2 -2
- package/Utils/ScheduledMaintenanceStart.d.mts +3 -0
- package/Utils/ScheduledMaintenanceStart.d.ts +3 -0
- package/Utils/ScheduledMaintenanceStart.js +9 -0
- package/Utils/Schema/ModelSchema.js +10 -1
- package/Utils/Uptime/UptimeMaintenanceUtil.js +2 -1
- package/Utils/ValueFormatter.d.mts +8 -6
- package/Utils/ValueFormatter.d.ts +8 -6
- package/Utils/ValueFormatter.js +145 -0
- package/package.json +1 -1
|
@@ -99,6 +99,18 @@ var ProductEventName;
|
|
|
99
99
|
ProductEventName["SetupHealthFixOpened"] = "setup_health/fix_opened";
|
|
100
100
|
ProductEventName["SetupHealthFindingDismissed"] = "setup_health/finding_dismissed";
|
|
101
101
|
ProductEventName["SetupHealthFindingRestored"] = "setup_health/finding_restored";
|
|
102
|
+
// How to reach me (#6820): a paging ladder saved, and the grid opened.
|
|
103
|
+
ProductEventName["PagingLadderSaved"] = "paging_ladder/saved";
|
|
104
|
+
ProductEventName["PagingLadderGridOpened"] = "paging_ladder/grid_opened";
|
|
105
|
+
// "Used by" (#6813): the full list of what refers to a record was opened.
|
|
106
|
+
ProductEventName["UsedByListOpened"] = "used_by/list_opened";
|
|
107
|
+
/*
|
|
108
|
+
* A sample project (#6808): made or opened again from an entry point,
|
|
109
|
+
* and deleted from its bar. The only events a sample sends: nothing done
|
|
110
|
+
* inside one is a project getting value (ProductEvents.send).
|
|
111
|
+
*/
|
|
112
|
+
ProductEventName["SampleProjectStarted"] = "sample_project/started";
|
|
113
|
+
ProductEventName["SampleProjectDeleted"] = "sample_project/deleted";
|
|
102
114
|
})(ProductEventName || (exports.ProductEventName = ProductEventName = {}));
|
|
103
115
|
// The words of a search that found nothing, at most this long (Cloud only).
|
|
104
116
|
exports.SEARCH_QUERY_MAX_LENGTH = 40;
|
|
@@ -327,6 +339,35 @@ exports.PRODUCT_EVENTS = [
|
|
|
327
339
|
description: "A dismissed Setup health finding was restored.",
|
|
328
340
|
properties: [token("check")],
|
|
329
341
|
},
|
|
342
|
+
{
|
|
343
|
+
name: ProductEventName.PagingLadderSaved,
|
|
344
|
+
description: "A paging ladder was saved on How to Reach Me: by the person or for a member, how many steps, and how many cards that differed it replaced.",
|
|
345
|
+
properties: [
|
|
346
|
+
{ name: "is_own" },
|
|
347
|
+
{ name: "step_count" },
|
|
348
|
+
{ name: "replaced_card_count" },
|
|
349
|
+
],
|
|
350
|
+
},
|
|
351
|
+
{
|
|
352
|
+
name: ProductEventName.PagingLadderGridOpened,
|
|
353
|
+
description: "The per-severity grid behind a paging ladder was opened on How to Reach Me, and how many cards differed from the ladder then.",
|
|
354
|
+
properties: [{ name: "is_own" }, { name: "differing_card_count" }],
|
|
355
|
+
},
|
|
356
|
+
{
|
|
357
|
+
name: ProductEventName.UsedByListOpened,
|
|
358
|
+
description: 'The full list of what refers to a record was opened: a relation\'s "See all" on a record\'s Used by card (relation), or a label\'s Used by (relation "all").',
|
|
359
|
+
properties: [token("record_kind"), token("relation")],
|
|
360
|
+
},
|
|
361
|
+
{
|
|
362
|
+
name: ProductEventName.SampleProjectStarted,
|
|
363
|
+
description: "Explore Sample Project was pressed: where (from - welcome, goals, home), and whether a sample was made or the person's existing one opened (is_new).",
|
|
364
|
+
properties: [token("from"), { name: "is_new" }],
|
|
365
|
+
},
|
|
366
|
+
{
|
|
367
|
+
name: ProductEventName.SampleProjectDeleted,
|
|
368
|
+
description: "A sample project was deleted from its bar, and how many days after it was made (days_kept).",
|
|
369
|
+
properties: [{ name: "days_kept" }],
|
|
370
|
+
},
|
|
330
371
|
];
|
|
331
372
|
/*
|
|
332
373
|
* The words a property name may not hold, split at underscores and capital
|
|
@@ -25,6 +25,7 @@ export declare const looksLikeSecretColumn: (name: string, type: TableColumnType
|
|
|
25
25
|
export interface AuditLogCoverageModel {
|
|
26
26
|
tableName: string | null;
|
|
27
27
|
singularName: string | null;
|
|
28
|
+
apiSingularName?: string | null | undefined;
|
|
28
29
|
getTenantColumn: () => string | null;
|
|
29
30
|
getTableColumns: () => {
|
|
30
31
|
columns: Array<string>;
|
|
@@ -25,6 +25,7 @@ export declare const looksLikeSecretColumn: (name: string, type: TableColumnType
|
|
|
25
25
|
export interface AuditLogCoverageModel {
|
|
26
26
|
tableName: string | null;
|
|
27
27
|
singularName: string | null;
|
|
28
|
+
apiSingularName?: string | null | undefined;
|
|
28
29
|
getTenantColumn: () => string | null;
|
|
29
30
|
getTableColumns: () => {
|
|
30
31
|
columns: Array<string>;
|
|
@@ -623,8 +623,10 @@ const inferRootResource = (model) => {
|
|
|
623
623
|
}
|
|
624
624
|
const root = getRelatedModel(metadata.modelType);
|
|
625
625
|
const rootTable = root.tableName;
|
|
626
|
+
// The type the root's own entries are stored under, so the two match.
|
|
627
|
+
const rootType = root.apiSingularName || root.singularName;
|
|
626
628
|
if (!rootTable ||
|
|
627
|
-
!
|
|
629
|
+
!rootType ||
|
|
628
630
|
rootTable === tableName ||
|
|
629
631
|
!tableName.startsWith(rootTable) ||
|
|
630
632
|
!exports.AUDIT_LOG_ROOT_RESOURCE_TABLES.has(rootTable)) {
|
|
@@ -642,7 +644,7 @@ const inferRootResource = (model) => {
|
|
|
642
644
|
if (!found || rootTable.length > found.tableLength) {
|
|
643
645
|
found = {
|
|
644
646
|
tableLength: rootTable.length,
|
|
645
|
-
root: { resourceType:
|
|
647
|
+
root: { resourceType: rootType, column: idColumn },
|
|
646
648
|
};
|
|
647
649
|
isTied = false;
|
|
648
650
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { CloudProvider } from "./CloudPlatform.mjs";
|
|
2
|
+
import { Translator } from "../Translator.mjs";
|
|
2
3
|
export declare enum CloudServiceModel {
|
|
3
4
|
IaaS = "iaas",
|
|
4
5
|
PaaS = "paas"
|
|
@@ -70,6 +71,7 @@ export interface CloudNamedOnlyResourceType {
|
|
|
70
71
|
export declare const NAMED_ONLY_RESOURCE_TYPES: ReadonlyArray<CloudNamedOnlyResourceType>;
|
|
71
72
|
export declare function getReadableCloudResourceType(type: string | null | undefined): string;
|
|
72
73
|
export declare function getCloudResourceTypeDisplayName(provider: string | null | undefined, type: string | null | undefined): string;
|
|
74
|
+
export declare function getCloudResourceTypeText(provider: string | null | undefined, type: string | null | undefined, translator: Pick<Translator, "translateText">): string;
|
|
73
75
|
export declare function getCanonicalCloudResourceType(provider: string, type: string): string;
|
|
74
76
|
export declare function getAwsCloudWatchRulesForNamespace(namespace: string): ReadonlyArray<AwsCloudWatchResourceRule>;
|
|
75
77
|
export declare const AWS_CLOUDWATCH_DISCOVERY_NAMESPACES: ReadonlyArray<string>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { CloudProvider } from "./CloudPlatform";
|
|
2
|
+
import { Translator } from "../Translator";
|
|
2
3
|
export declare enum CloudServiceModel {
|
|
3
4
|
IaaS = "iaas",
|
|
4
5
|
PaaS = "paas"
|
|
@@ -70,6 +71,7 @@ export interface CloudNamedOnlyResourceType {
|
|
|
70
71
|
export declare const NAMED_ONLY_RESOURCE_TYPES: ReadonlyArray<CloudNamedOnlyResourceType>;
|
|
71
72
|
export declare function getReadableCloudResourceType(type: string | null | undefined): string;
|
|
72
73
|
export declare function getCloudResourceTypeDisplayName(provider: string | null | undefined, type: string | null | undefined): string;
|
|
74
|
+
export declare function getCloudResourceTypeText(provider: string | null | undefined, type: string | null | undefined, translator: Pick<Translator, "translateText">): string;
|
|
73
75
|
export declare function getCanonicalCloudResourceType(provider: string, type: string): string;
|
|
74
76
|
export declare function getAwsCloudWatchRulesForNamespace(namespace: string): ReadonlyArray<AwsCloudWatchResourceRule>;
|
|
75
77
|
export declare const AWS_CLOUDWATCH_DISCOVERY_NAMESPACES: ReadonlyArray<string>;
|
|
@@ -7,6 +7,7 @@ exports.isInventoryOnlyCloudResourceType = isInventoryOnlyCloudResourceType;
|
|
|
7
7
|
exports.getCloudResourceTypeLabel = getCloudResourceTypeLabel;
|
|
8
8
|
exports.getReadableCloudResourceType = getReadableCloudResourceType;
|
|
9
9
|
exports.getCloudResourceTypeDisplayName = getCloudResourceTypeDisplayName;
|
|
10
|
+
exports.getCloudResourceTypeText = getCloudResourceTypeText;
|
|
10
11
|
exports.getCanonicalCloudResourceType = getCanonicalCloudResourceType;
|
|
11
12
|
exports.getAwsCloudWatchRulesForNamespace = getAwsCloudWatchRulesForNamespace;
|
|
12
13
|
exports.getGcpMonitoredResourceRule = getGcpMonitoredResourceRule;
|
|
@@ -1405,9 +1406,11 @@ function getReadableCloudResourceType(type) {
|
|
|
1405
1406
|
return trimmed;
|
|
1406
1407
|
}
|
|
1407
1408
|
/*
|
|
1408
|
-
* What a page calls a resource of this type: the catalog's
|
|
1409
|
-
* only type's (Subnet, Security Group), else the type in
|
|
1410
|
-
* (getReadableCloudResourceType).
|
|
1409
|
+
* What a page calls a resource of this type, in English: the catalog's
|
|
1410
|
+
* label, a named only type's (Subnet, Security Group), else the type in
|
|
1411
|
+
* words (getReadableCloudResourceType). A list of resources, which never
|
|
1412
|
+
* holds a named only type, draws it as it comes; where one can be named, a
|
|
1413
|
+
* page draws getCloudResourceTypeText. For a page only: what is stored - a
|
|
1411
1414
|
* resource's name, a rule, the AI's facts - keeps getCloudResourceTypeLabel,
|
|
1412
1415
|
* whose fallback is the type as the cloud spells it.
|
|
1413
1416
|
*/
|
|
@@ -1424,6 +1427,33 @@ function getCloudResourceTypeDisplayName(provider, type) {
|
|
|
1424
1427
|
}
|
|
1425
1428
|
return getReadableCloudResourceType(type);
|
|
1426
1429
|
}
|
|
1430
|
+
// The words the catalog lists its types under: the clouds' product names.
|
|
1431
|
+
const LISTED_TYPE_LABELS = new Set(exports.CLOUD_RESOURCE_TYPES.map((descriptor) => {
|
|
1432
|
+
return descriptor.label;
|
|
1433
|
+
}));
|
|
1434
|
+
/*
|
|
1435
|
+
* A resource type's name as a page draws it, by one rule on every page
|
|
1436
|
+
* (#7659). The catalog's labels are the clouds' product names - "Virtual
|
|
1437
|
+
* Machine", "EC2 Instance", "Cloud Run Service" - drawn as written in every
|
|
1438
|
+
* language: as the docs' tables list them, as a resource's name carries
|
|
1439
|
+
* them ("web-01 (Virtual Machine)"), and as the lists, the Type filters and
|
|
1440
|
+
* their chips, the topology and a resource's own page draw them. So is a
|
|
1441
|
+
* type in words ("Transit Gateway (EC2)"). Only a named only type's label
|
|
1442
|
+
* is a common noun, drawn in the reader's language ("Subred") - unless a
|
|
1443
|
+
* listed type is called the same ("Instance Group", "Network Interface",
|
|
1444
|
+
* "KMS Key"): those words are a product's name, and one resource reads the
|
|
1445
|
+
* same whether OneUptime holds it or only a link to it.
|
|
1446
|
+
*/
|
|
1447
|
+
function getCloudResourceTypeText(provider, type, translator) {
|
|
1448
|
+
const name = getCloudResourceTypeDisplayName(provider, type);
|
|
1449
|
+
if (!provider ||
|
|
1450
|
+
!type ||
|
|
1451
|
+
LISTED_TYPE_LABELS.has(name) ||
|
|
1452
|
+
!NAMED_ONLY_LABELS.has(typeLookupKey(provider, type))) {
|
|
1453
|
+
return name;
|
|
1454
|
+
}
|
|
1455
|
+
return translator.translateText(name) || name;
|
|
1456
|
+
}
|
|
1427
1457
|
/*
|
|
1428
1458
|
* The type spelled the way the catalog spells it - Azure Monitor's
|
|
1429
1459
|
* `Microsoft.ServiceBus/Namespaces` becomes `Microsoft.ServiceBus/namespaces`
|
|
@@ -18,6 +18,7 @@ export const getCanonicalCloudResourceType = commonJsModule.getCanonicalCloudRes
|
|
|
18
18
|
export const getCloudResourceTypeDescriptor = commonJsModule.getCloudResourceTypeDescriptor;
|
|
19
19
|
export const getCloudResourceTypeDisplayName = commonJsModule.getCloudResourceTypeDisplayName;
|
|
20
20
|
export const getCloudResourceTypeLabel = commonJsModule.getCloudResourceTypeLabel;
|
|
21
|
+
export const getCloudResourceTypeText = commonJsModule.getCloudResourceTypeText;
|
|
21
22
|
export const getGcpMonitoredResourceRule = commonJsModule.getGcpMonitoredResourceRule;
|
|
22
23
|
export const getReadableCloudResourceType = commonJsModule.getReadableCloudResourceType;
|
|
23
24
|
export const isInventoryOnlyCloudResourceType = commonJsModule.isInventoryOnlyCloudResourceType;
|
|
@@ -1,10 +1,35 @@
|
|
|
1
|
+
import { TemplateValues } from "../Translator.mjs";
|
|
1
2
|
import { DataAssetColumn } from "./DataAssetColumn.mjs";
|
|
2
3
|
import { DataCheckAlertCondition, DataCheckType } from "./DataCheckType.mjs";
|
|
3
4
|
import { DataColumnSensitivity } from "./DataColumnSensitivity.mjs";
|
|
5
|
+
export interface DataCheckSuggestionWords {
|
|
6
|
+
template: string;
|
|
7
|
+
values: TemplateValues;
|
|
8
|
+
}
|
|
9
|
+
export declare const DATA_CHECK_SUGGESTION_SENTENCES: {
|
|
10
|
+
uniqueName: string;
|
|
11
|
+
uniqueReason: string;
|
|
12
|
+
orphansName: string;
|
|
13
|
+
orphansReason: string;
|
|
14
|
+
nullsName: string;
|
|
15
|
+
nullsReason: string;
|
|
16
|
+
volumeByName: string;
|
|
17
|
+
volumeByReason: string;
|
|
18
|
+
emailFormatName: string;
|
|
19
|
+
emailFormatReason: string;
|
|
20
|
+
notNegativeName: string;
|
|
21
|
+
notNegativeReason: string;
|
|
22
|
+
valuesName: string;
|
|
23
|
+
valuesReason: string;
|
|
24
|
+
sensitiveFormatName: string;
|
|
25
|
+
sensitiveFormatReason: string;
|
|
26
|
+
};
|
|
4
27
|
export interface DataCheckSuggestion {
|
|
5
28
|
id: string;
|
|
6
29
|
name: string;
|
|
7
30
|
reason: string;
|
|
31
|
+
nameWords: DataCheckSuggestionWords;
|
|
32
|
+
reasonWords: DataCheckSuggestionWords;
|
|
8
33
|
checkType: DataCheckType;
|
|
9
34
|
columnName?: string | undefined;
|
|
10
35
|
segmentColumn?: string | undefined;
|
|
@@ -1,10 +1,35 @@
|
|
|
1
|
+
import { TemplateValues } from "../Translator";
|
|
1
2
|
import { DataAssetColumn } from "./DataAssetColumn";
|
|
2
3
|
import { DataCheckAlertCondition, DataCheckType } from "./DataCheckType";
|
|
3
4
|
import { DataColumnSensitivity } from "./DataColumnSensitivity";
|
|
5
|
+
export interface DataCheckSuggestionWords {
|
|
6
|
+
template: string;
|
|
7
|
+
values: TemplateValues;
|
|
8
|
+
}
|
|
9
|
+
export declare const DATA_CHECK_SUGGESTION_SENTENCES: {
|
|
10
|
+
uniqueName: string;
|
|
11
|
+
uniqueReason: string;
|
|
12
|
+
orphansName: string;
|
|
13
|
+
orphansReason: string;
|
|
14
|
+
nullsName: string;
|
|
15
|
+
nullsReason: string;
|
|
16
|
+
volumeByName: string;
|
|
17
|
+
volumeByReason: string;
|
|
18
|
+
emailFormatName: string;
|
|
19
|
+
emailFormatReason: string;
|
|
20
|
+
notNegativeName: string;
|
|
21
|
+
notNegativeReason: string;
|
|
22
|
+
valuesName: string;
|
|
23
|
+
valuesReason: string;
|
|
24
|
+
sensitiveFormatName: string;
|
|
25
|
+
sensitiveFormatReason: string;
|
|
26
|
+
};
|
|
4
27
|
export interface DataCheckSuggestion {
|
|
5
28
|
id: string;
|
|
6
29
|
name: string;
|
|
7
30
|
reason: string;
|
|
31
|
+
nameWords: DataCheckSuggestionWords;
|
|
32
|
+
reasonWords: DataCheckSuggestionWords;
|
|
8
33
|
checkType: DataCheckType;
|
|
9
34
|
columnName?: string | undefined;
|
|
10
35
|
segmentColumn?: string | undefined;
|
|
@@ -1,9 +1,35 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.MAX_SUGGESTIONS_PER_TABLE = exports.EMAIL_PATTERN = void 0;
|
|
3
|
+
exports.MAX_SUGGESTIONS_PER_TABLE = exports.EMAIL_PATTERN = exports.DATA_CHECK_SUGGESTION_SENTENCES = void 0;
|
|
4
4
|
exports.suggestDataChecks = suggestDataChecks;
|
|
5
|
+
const DataTypeCatalog_1 = require("../DataSecurity/DataTypeCatalog");
|
|
6
|
+
const Translator_1 = require("../Translator");
|
|
5
7
|
const DataCheckFormats_1 = require("./DataCheckFormats");
|
|
6
8
|
const DataCheckType_1 = require("./DataCheckType");
|
|
9
|
+
/*
|
|
10
|
+
* The sentences a suggestion is worded with, by what they are. Each is
|
|
11
|
+
* worded in every language the Dashboard is read in; a column's, a table's
|
|
12
|
+
* or a segment's name goes in as it is, and a data type in the reader's
|
|
13
|
+
* words when it is one of Data Security's own (getDataTypeValue).
|
|
14
|
+
*/
|
|
15
|
+
exports.DATA_CHECK_SUGGESTION_SENTENCES = {
|
|
16
|
+
uniqueName: (0, Translator_1.translationKey)("{{column}} is unique"),
|
|
17
|
+
uniqueReason: (0, Translator_1.translationKey)("An id that repeats breaks every join and lookup on it."),
|
|
18
|
+
orphansName: (0, Translator_1.translationKey)("Every {{column}} has a {{table}} row"),
|
|
19
|
+
orphansReason: (0, Translator_1.translationKey)("Rows whose {{column}} has no match in {{table}} are orphans: a delete that did not cascade, or a load out of order."),
|
|
20
|
+
nullsName: (0, Translator_1.translationKey)("{{column}} is filled in as usual"),
|
|
21
|
+
nullsReason: (0, Translator_1.translationKey)("A deploy that stops setting {{column}} shows as more empty values than usual."),
|
|
22
|
+
volumeByName: (0, Translator_1.translationKey)("Rows per {{segment}}"),
|
|
23
|
+
volumeByReason: (0, Translator_1.translationKey)("One {{segment}} that stops sending data is lost in the table's total: counted per {{column}}, it alerts on its own."),
|
|
24
|
+
emailFormatName: (0, Translator_1.translationKey)("{{column}} looks like an email address"),
|
|
25
|
+
emailFormatReason: (0, Translator_1.translationKey)("Values that are not email addresses are bad input, or a column filled from the wrong field."),
|
|
26
|
+
notNegativeName: (0, Translator_1.translationKey)("{{column}} is not negative"),
|
|
27
|
+
notNegativeReason: (0, Translator_1.translationKey)("A negative {{column}} is usually a sign or unit error."),
|
|
28
|
+
valuesName: (0, Translator_1.translationKey)("{{column}} takes its usual values"),
|
|
29
|
+
valuesReason: (0, Translator_1.translationKey)("A {{column}} that suddenly has more different values than usual is a new, unexpected value being written."),
|
|
30
|
+
sensitiveFormatName: (0, Translator_1.translationKey)("{{column}} looks like {{dataType}}"),
|
|
31
|
+
sensitiveFormatReason: (0, Translator_1.translationKey)("Data Security says this column holds {{dataType}}. Values that do not look like it are bad input, or a column filled from the wrong field."),
|
|
32
|
+
};
|
|
7
33
|
exports.EMAIL_PATTERN = "^[^@\\s]+@[^@\\s]+\\.[^@\\s]+$";
|
|
8
34
|
// The most suggestions one table is offered at once.
|
|
9
35
|
exports.MAX_SUGGESTIONS_PER_TABLE = 12;
|
|
@@ -13,6 +39,28 @@ const MONEY_NAME = /(^|_)(amount|price|total|cost|balance|fee|subtotal)(_|$)/i;
|
|
|
13
39
|
const CATEGORY_NAME = /(^|_)(status|state|type|kind|category|stage)$/i;
|
|
14
40
|
const EMAIL_NAME = /(^|_)e?mail(_address)?$/i;
|
|
15
41
|
const TENANT_NAME = /^(tenant|org|organization|organisation|account|workspace|team|customer)_id$/i;
|
|
42
|
+
// A suggestion's name and reason: each sentence with its names, and its English.
|
|
43
|
+
function worded(data) {
|
|
44
|
+
return {
|
|
45
|
+
name: (0, Translator_1.fillTemplate)(data.name, data.values),
|
|
46
|
+
reason: (0, Translator_1.fillTemplate)(data.reason, data.values),
|
|
47
|
+
nameWords: { template: data.name, values: data.values },
|
|
48
|
+
reasonWords: { template: data.reason, values: data.values },
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
/*
|
|
52
|
+
* A data type in a sentence: one of Data Security's own (Email address,
|
|
53
|
+
* Phone number, IP address) in the reader's words, by its catalog name;
|
|
54
|
+
* otherwise, and in English, as Data Security named it.
|
|
55
|
+
*/
|
|
56
|
+
function getDataTypeValue(sensitive) {
|
|
57
|
+
return (0, Translator_1.composedValue)((translator) => {
|
|
58
|
+
const builtIn = (0, DataTypeCatalog_1.getBuiltInDataType)(sensitive.dataTypeId);
|
|
59
|
+
return builtIn && translator.hasTranslation(builtIn.name)
|
|
60
|
+
? translator.translateTerm(builtIn.name, { inSentence: true })
|
|
61
|
+
: sensitive.dataTypeName;
|
|
62
|
+
});
|
|
63
|
+
}
|
|
16
64
|
function isNumeric(column) {
|
|
17
65
|
return NUMERIC_TYPE.test(column.dataType);
|
|
18
66
|
}
|
|
@@ -52,15 +100,11 @@ function suggestDataChecks(data) {
|
|
|
52
100
|
const name = column.name;
|
|
53
101
|
const lower = name.toLowerCase();
|
|
54
102
|
if (lower === "id") {
|
|
55
|
-
suggestions.push({
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
columnName: name,
|
|
61
|
-
alertCondition: DataCheckType_1.DataCheckAlertCondition.Above,
|
|
62
|
-
alertThreshold: 0,
|
|
63
|
-
});
|
|
103
|
+
suggestions.push(Object.assign(Object.assign({ id: `unique:${name}` }, worded({
|
|
104
|
+
name: exports.DATA_CHECK_SUGGESTION_SENTENCES.uniqueName,
|
|
105
|
+
reason: exports.DATA_CHECK_SUGGESTION_SENTENCES.uniqueReason,
|
|
106
|
+
values: { column: name },
|
|
107
|
+
})), { checkType: DataCheckType_1.DataCheckType.DuplicatePercent, columnName: name, alertCondition: DataCheckType_1.DataCheckAlertCondition.Above, alertThreshold: 0 }));
|
|
64
108
|
continue;
|
|
65
109
|
}
|
|
66
110
|
if (lower.endsWith("_id")) {
|
|
@@ -68,8 +112,23 @@ function suggestDataChecks(data) {
|
|
|
68
112
|
if (referenced) {
|
|
69
113
|
suggestions.push({
|
|
70
114
|
id: `orphans:${name}:${referenced.tableKey}`,
|
|
71
|
-
name:
|
|
72
|
-
|
|
115
|
+
name: (0, Translator_1.fillTemplate)(exports.DATA_CHECK_SUGGESTION_SENTENCES.orphansName, {
|
|
116
|
+
column: name,
|
|
117
|
+
table: referenced.name,
|
|
118
|
+
}),
|
|
119
|
+
reason: (0, Translator_1.fillTemplate)(exports.DATA_CHECK_SUGGESTION_SENTENCES.orphansReason, {
|
|
120
|
+
column: name,
|
|
121
|
+
table: referenced.tableKey,
|
|
122
|
+
}),
|
|
123
|
+
// Its name says the table's name; why, the table as a query writes it.
|
|
124
|
+
nameWords: {
|
|
125
|
+
template: exports.DATA_CHECK_SUGGESTION_SENTENCES.orphansName,
|
|
126
|
+
values: { column: name, table: referenced.name },
|
|
127
|
+
},
|
|
128
|
+
reasonWords: {
|
|
129
|
+
template: exports.DATA_CHECK_SUGGESTION_SENTENCES.orphansReason,
|
|
130
|
+
values: { column: name, table: referenced.tableKey },
|
|
131
|
+
},
|
|
73
132
|
checkType: DataCheckType_1.DataCheckType.OrphanCount,
|
|
74
133
|
columnName: name,
|
|
75
134
|
referenceTableKey: referenced.tableKey,
|
|
@@ -81,58 +140,41 @@ function suggestDataChecks(data) {
|
|
|
81
140
|
});
|
|
82
141
|
}
|
|
83
142
|
if (column.isNullable) {
|
|
84
|
-
suggestions.push({
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
columnName: name,
|
|
90
|
-
alertCondition: DataCheckType_1.DataCheckAlertCondition.UnusuallyHigh,
|
|
91
|
-
});
|
|
143
|
+
suggestions.push(Object.assign(Object.assign({ id: `nulls:${name}` }, worded({
|
|
144
|
+
name: exports.DATA_CHECK_SUGGESTION_SENTENCES.nullsName,
|
|
145
|
+
reason: exports.DATA_CHECK_SUGGESTION_SENTENCES.nullsReason,
|
|
146
|
+
values: { column: name },
|
|
147
|
+
})), { checkType: DataCheckType_1.DataCheckType.NullPercent, columnName: name, alertCondition: DataCheckType_1.DataCheckAlertCondition.UnusuallyHigh }));
|
|
92
148
|
}
|
|
93
149
|
}
|
|
94
150
|
if (TENANT_NAME.test(lower)) {
|
|
95
|
-
suggestions.push({
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
alertCondition: DataCheckType_1.DataCheckAlertCondition.UnusuallyLow,
|
|
102
|
-
});
|
|
151
|
+
suggestions.push(Object.assign(Object.assign({ id: `volume-by:${name}` }, worded({
|
|
152
|
+
name: exports.DATA_CHECK_SUGGESTION_SENTENCES.volumeByName,
|
|
153
|
+
reason: exports.DATA_CHECK_SUGGESTION_SENTENCES.volumeByReason,
|
|
154
|
+
// "tenant_id" counts per tenant: the segment is the name without its _id.
|
|
155
|
+
values: { segment: name.replace(/_id$/i, ""), column: name },
|
|
156
|
+
})), { checkType: DataCheckType_1.DataCheckType.RowCount, segmentColumn: name, alertCondition: DataCheckType_1.DataCheckAlertCondition.UnusuallyLow }));
|
|
103
157
|
}
|
|
104
158
|
if (EMAIL_NAME.test(lower) && isText(column)) {
|
|
105
|
-
suggestions.push({
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
columnName: name,
|
|
111
|
-
pattern: exports.EMAIL_PATTERN,
|
|
112
|
-
alertCondition: DataCheckType_1.DataCheckAlertCondition.Above,
|
|
113
|
-
alertThreshold: 1,
|
|
114
|
-
});
|
|
159
|
+
suggestions.push(Object.assign(Object.assign({ id: `email-format:${name}` }, worded({
|
|
160
|
+
name: exports.DATA_CHECK_SUGGESTION_SENTENCES.emailFormatName,
|
|
161
|
+
reason: exports.DATA_CHECK_SUGGESTION_SENTENCES.emailFormatReason,
|
|
162
|
+
values: { column: name },
|
|
163
|
+
})), { checkType: DataCheckType_1.DataCheckType.FormatMismatchPercent, columnName: name, pattern: exports.EMAIL_PATTERN, alertCondition: DataCheckType_1.DataCheckAlertCondition.Above, alertThreshold: 1 }));
|
|
115
164
|
}
|
|
116
165
|
if (MONEY_NAME.test(lower) && isNumeric(column)) {
|
|
117
|
-
suggestions.push({
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
columnName: name,
|
|
123
|
-
alertCondition: DataCheckType_1.DataCheckAlertCondition.Below,
|
|
124
|
-
alertThreshold: 0,
|
|
125
|
-
});
|
|
166
|
+
suggestions.push(Object.assign(Object.assign({ id: `not-negative:${name}` }, worded({
|
|
167
|
+
name: exports.DATA_CHECK_SUGGESTION_SENTENCES.notNegativeName,
|
|
168
|
+
reason: exports.DATA_CHECK_SUGGESTION_SENTENCES.notNegativeReason,
|
|
169
|
+
values: { column: name },
|
|
170
|
+
})), { checkType: DataCheckType_1.DataCheckType.Minimum, columnName: name, alertCondition: DataCheckType_1.DataCheckAlertCondition.Below, alertThreshold: 0 }));
|
|
126
171
|
}
|
|
127
172
|
if (CATEGORY_NAME.test(lower)) {
|
|
128
|
-
suggestions.push({
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
columnName: name,
|
|
134
|
-
alertCondition: DataCheckType_1.DataCheckAlertCondition.UnusuallyHigh,
|
|
135
|
-
});
|
|
173
|
+
suggestions.push(Object.assign(Object.assign({ id: `values:${name}` }, worded({
|
|
174
|
+
name: exports.DATA_CHECK_SUGGESTION_SENTENCES.valuesName,
|
|
175
|
+
reason: exports.DATA_CHECK_SUGGESTION_SENTENCES.valuesReason,
|
|
176
|
+
values: { column: name },
|
|
177
|
+
})), { checkType: DataCheckType_1.DataCheckType.DistinctCount, columnName: name, alertCondition: DataCheckType_1.DataCheckAlertCondition.UnusuallyHigh }));
|
|
136
178
|
}
|
|
137
179
|
}
|
|
138
180
|
for (const sensitive of data.sensitiveColumns || []) {
|
|
@@ -150,16 +192,11 @@ function suggestDataChecks(data) {
|
|
|
150
192
|
})) {
|
|
151
193
|
continue;
|
|
152
194
|
}
|
|
153
|
-
suggestions.push({
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
columnName: column.name,
|
|
159
|
-
pattern,
|
|
160
|
-
alertCondition: DataCheckType_1.DataCheckAlertCondition.Above,
|
|
161
|
-
alertThreshold: 1,
|
|
162
|
-
});
|
|
195
|
+
suggestions.push(Object.assign(Object.assign({ id: `sensitive-format:${column.name}` }, worded({
|
|
196
|
+
name: exports.DATA_CHECK_SUGGESTION_SENTENCES.sensitiveFormatName,
|
|
197
|
+
reason: exports.DATA_CHECK_SUGGESTION_SENTENCES.sensitiveFormatReason,
|
|
198
|
+
values: { column: column.name, dataType: getDataTypeValue(sensitive) },
|
|
199
|
+
})), { checkType: DataCheckType_1.DataCheckType.FormatMismatchPercent, columnName: column.name, pattern, alertCondition: DataCheckType_1.DataCheckAlertCondition.Above, alertThreshold: 1 }));
|
|
163
200
|
}
|
|
164
201
|
return suggestions
|
|
165
202
|
.filter((suggestion) => {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import commonJsModule from "./DataCheckSuggestions.js";
|
|
2
|
+
export const DATA_CHECK_SUGGESTION_SENTENCES = commonJsModule.DATA_CHECK_SUGGESTION_SENTENCES;
|
|
2
3
|
export const EMAIL_PATTERN = commonJsModule.EMAIL_PATTERN;
|
|
3
4
|
export const MAX_SUGGESTIONS_PER_TABLE = commonJsModule.MAX_SUGGESTIONS_PER_TABLE;
|
|
4
5
|
export const suggestDataChecks = commonJsModule.suggestDataChecks;
|
|
@@ -10,5 +10,7 @@ declare const _default: (props: {
|
|
|
10
10
|
enableRealtimeEventsOn?: EnableRealtimeEventsOn | undefined;
|
|
11
11
|
displayNameColumn?: string | undefined;
|
|
12
12
|
formerSingularName?: string | undefined;
|
|
13
|
+
apiSingularName?: string | undefined;
|
|
14
|
+
apiPluralName?: string | undefined;
|
|
13
15
|
}) => (ctr: GenericFunction) => void;
|
|
14
16
|
export default _default;
|
|
@@ -10,5 +10,7 @@ declare const _default: (props: {
|
|
|
10
10
|
enableRealtimeEventsOn?: EnableRealtimeEventsOn | undefined;
|
|
11
11
|
displayNameColumn?: string | undefined;
|
|
12
12
|
formerSingularName?: string | undefined;
|
|
13
|
+
apiSingularName?: string | undefined;
|
|
14
|
+
apiPluralName?: string | undefined;
|
|
13
15
|
}) => (ctr: GenericFunction) => void;
|
|
14
16
|
export default _default;
|
|
@@ -16,5 +16,11 @@ exports.default = (props) => {
|
|
|
16
16
|
if (props.formerSingularName) {
|
|
17
17
|
ctr.prototype.formerSingularName = props.formerSingularName;
|
|
18
18
|
}
|
|
19
|
+
if (props.apiSingularName) {
|
|
20
|
+
ctr.prototype.apiSingularName = props.apiSingularName;
|
|
21
|
+
}
|
|
22
|
+
if (props.apiPluralName) {
|
|
23
|
+
ctr.prototype.apiPluralName = props.apiPluralName;
|
|
24
|
+
}
|
|
19
25
|
};
|
|
20
26
|
};
|
package/Types/Date.d.mts
CHANGED
|
@@ -278,9 +278,27 @@ export default class OneUptimeDate {
|
|
|
278
278
|
static timezoneOffsetDate(date: Date): Date;
|
|
279
279
|
/**
|
|
280
280
|
* Render an instant as the value of an `<input type="datetime-local">` — a
|
|
281
|
-
* bare wall-clock with no offset — read in the current timezone
|
|
281
|
+
* bare wall-clock with no offset — read in the current timezone, to the
|
|
282
|
+
* second ("2026-11-13T11:15:52").
|
|
283
|
+
*
|
|
284
|
+
* A field people schedule with shows toDateTimeLocalMinuteString instead:
|
|
285
|
+
* a value with seconds makes the browser's picker show and ask for them
|
|
286
|
+
* too. Only a field that compares with event timestamps (a telemetry time
|
|
287
|
+
* range) keeps the seconds, by opting in (Input's showSecondsForDateTime).
|
|
282
288
|
*/
|
|
283
289
|
static toDateTimeLocalString(date: Date): string;
|
|
290
|
+
/**
|
|
291
|
+
* The value an `<input type="datetime-local">` shows a person who picks a
|
|
292
|
+
* time to schedule or record something: the wall clock in the current
|
|
293
|
+
* timezone, to the minute ("2026-11-13T11:15"). Without seconds in its
|
|
294
|
+
* value, the browser's picker shows hours and minutes and no seconds
|
|
295
|
+
* column, and what is picked comes back to the minute.
|
|
296
|
+
*
|
|
297
|
+
* The seconds of an instant stored with them are not shown, and not lost:
|
|
298
|
+
* a field left as it was keeps the value it was given (Input changes its
|
|
299
|
+
* value only when the person changes the field).
|
|
300
|
+
*/
|
|
301
|
+
static toDateTimeLocalMinuteString(date: Date): string;
|
|
284
302
|
/**
|
|
285
303
|
* Inverse of toDateTimeLocalString: turn the offset-less wall-clock a user
|
|
286
304
|
* typed into a `<input type="date">` / `<input type="datetime-local">` into
|
|
@@ -347,6 +365,7 @@ export default class OneUptimeDate {
|
|
|
347
365
|
static getCurrentYear(): number;
|
|
348
366
|
static getStartOfDay(date: Date, timezone?: string | undefined): Date;
|
|
349
367
|
static getEndOfDay(date: Date, timezone?: string | undefined): Date;
|
|
368
|
+
static getStartOfMinute(date: Date | string): Date;
|
|
350
369
|
private static toMomentCalendarUnit;
|
|
351
370
|
private static inTimezone;
|
|
352
371
|
static getStartOfCalendarUnit(date: Date, unit: CalendarUnit, timezone?: string | undefined): Date;
|
package/Types/Date.d.ts
CHANGED
|
@@ -278,9 +278,27 @@ export default class OneUptimeDate {
|
|
|
278
278
|
static timezoneOffsetDate(date: Date): Date;
|
|
279
279
|
/**
|
|
280
280
|
* Render an instant as the value of an `<input type="datetime-local">` — a
|
|
281
|
-
* bare wall-clock with no offset — read in the current timezone
|
|
281
|
+
* bare wall-clock with no offset — read in the current timezone, to the
|
|
282
|
+
* second ("2026-11-13T11:15:52").
|
|
283
|
+
*
|
|
284
|
+
* A field people schedule with shows toDateTimeLocalMinuteString instead:
|
|
285
|
+
* a value with seconds makes the browser's picker show and ask for them
|
|
286
|
+
* too. Only a field that compares with event timestamps (a telemetry time
|
|
287
|
+
* range) keeps the seconds, by opting in (Input's showSecondsForDateTime).
|
|
282
288
|
*/
|
|
283
289
|
static toDateTimeLocalString(date: Date): string;
|
|
290
|
+
/**
|
|
291
|
+
* The value an `<input type="datetime-local">` shows a person who picks a
|
|
292
|
+
* time to schedule or record something: the wall clock in the current
|
|
293
|
+
* timezone, to the minute ("2026-11-13T11:15"). Without seconds in its
|
|
294
|
+
* value, the browser's picker shows hours and minutes and no seconds
|
|
295
|
+
* column, and what is picked comes back to the minute.
|
|
296
|
+
*
|
|
297
|
+
* The seconds of an instant stored with them are not shown, and not lost:
|
|
298
|
+
* a field left as it was keeps the value it was given (Input changes its
|
|
299
|
+
* value only when the person changes the field).
|
|
300
|
+
*/
|
|
301
|
+
static toDateTimeLocalMinuteString(date: Date): string;
|
|
284
302
|
/**
|
|
285
303
|
* Inverse of toDateTimeLocalString: turn the offset-less wall-clock a user
|
|
286
304
|
* typed into a `<input type="date">` / `<input type="datetime-local">` into
|
|
@@ -347,6 +365,7 @@ export default class OneUptimeDate {
|
|
|
347
365
|
static getCurrentYear(): number;
|
|
348
366
|
static getStartOfDay(date: Date, timezone?: string | undefined): Date;
|
|
349
367
|
static getEndOfDay(date: Date, timezone?: string | undefined): Date;
|
|
368
|
+
static getStartOfMinute(date: Date | string): Date;
|
|
350
369
|
private static toMomentCalendarUnit;
|
|
351
370
|
private static inTimezone;
|
|
352
371
|
static getStartOfCalendarUnit(date: Date, unit: CalendarUnit, timezone?: string | undefined): Date;
|