@oneuptime/common 14.0.91 → 14.0.92

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.
Files changed (90) hide show
  1. package/Models/DatabaseModels/AutoRemediationRule.js +1 -1
  2. package/Models/DatabaseModels/CodeRepository.d.mts +1 -0
  3. package/Models/DatabaseModels/CodeRepository.d.ts +1 -0
  4. package/Models/DatabaseModels/CodeRepository.js +69 -6
  5. package/Types/AI/CodeTask.d.mts +1 -0
  6. package/Types/AI/CodeTask.d.ts +1 -0
  7. package/Types/AI/TelemetryAiActivity.d.mts +1 -0
  8. package/Types/AI/TelemetryAiActivity.d.ts +1 -0
  9. package/Types/AI/TelemetryAiActivity.js +4 -0
  10. package/Types/CodeRepository/CodeRepositorySetting.d.mts +15 -0
  11. package/Types/CodeRepository/CodeRepositorySetting.d.ts +15 -0
  12. package/Types/CodeRepository/CodeRepositorySetting.js +49 -0
  13. package/Types/CodeRepository/CodeRepositorySetting.mjs +3 -0
  14. package/Types/Date.d.mts +10 -0
  15. package/Types/Date.d.ts +10 -0
  16. package/Types/Date.js +385 -98
  17. package/Types/DateLanguage.d.mts +67 -0
  18. package/Types/DateLanguage.d.ts +67 -0
  19. package/Types/DateLanguage.js +478 -0
  20. package/Types/DateLanguage.mjs +21 -0
  21. package/Types/Runner/CodeRepositoryRunner.d.mts +7 -0
  22. package/Types/Runner/CodeRepositoryRunner.d.ts +7 -0
  23. package/Types/Runner/CodeRepositoryRunner.js +60 -14
  24. package/Types/Runner/CodeRepositoryRunner.mjs +1 -0
  25. package/Types/SecurityEvent/OcsfProcessActivity.d.mts +25 -0
  26. package/Types/SecurityEvent/OcsfProcessActivity.d.ts +25 -0
  27. package/Types/SecurityEvent/OcsfProcessActivity.js +131 -0
  28. package/Types/SecurityEvent/OcsfProcessActivity.mjs +8 -0
  29. package/UI/Utils/TranslateTemplate.d.mts +73 -0
  30. package/UI/Utils/TranslateTemplate.d.ts +73 -0
  31. package/Utils/CronTab.d.mts +41 -3
  32. package/Utils/CronTab.d.ts +41 -3
  33. package/Utils/CronTab.js +112 -38
  34. package/Utils/Monitor/MonitorOverviewTargetUtil.d.mts +2 -0
  35. package/Utils/Monitor/MonitorOverviewTargetUtil.d.ts +2 -0
  36. package/Utils/Monitor/MonitorOverviewTargetUtil.js +13 -2
  37. package/Utils/SecurityEvent/Destinations/GoogleSecOpsUdmMapper.d.mts +5 -0
  38. package/Utils/SecurityEvent/Destinations/GoogleSecOpsUdmMapper.d.ts +5 -0
  39. package/Utils/SecurityEvent/Destinations/GoogleSecOpsUdmMapper.js +219 -58
  40. package/Utils/SecurityEvent/OcsfNormalizer.js +22 -13
  41. package/Utils/Slo/SloDuration.d.mts +1 -0
  42. package/Utils/Slo/SloDuration.d.ts +1 -0
  43. package/Utils/Slo/SloDuration.js +57 -8
  44. package/Utils/Slo/SloDuration.mjs +1 -0
  45. package/Utils/Suggestions/CodeFixSuggestion.d.mts +15 -0
  46. package/Utils/Suggestions/CodeFixSuggestion.d.ts +15 -0
  47. package/Utils/Suggestions/CodeFixSuggestion.js +62 -1
  48. package/Utils/Suggestions/CodeFixSuggestion.mjs +4 -0
  49. package/Utils/Suggestions/ProfileFixSuggestion.js +4 -0
  50. package/Utils/Suggestions/SuggestionBlocker.d.mts +8 -0
  51. package/Utils/Suggestions/SuggestionBlocker.d.ts +8 -0
  52. package/Utils/Suggestions/SuggestionBlocker.js +51 -0
  53. package/Utils/Suggestions/SuggestionBlocker.mjs +4 -0
  54. package/Utils/Suggestions/SuggestionOffer.d.mts +2 -1
  55. package/Utils/Suggestions/SuggestionOffer.d.ts +2 -1
  56. package/Utils/Suggestions/SuggestionOffer.js +5 -0
  57. package/Utils/Suggestions/TelemetryAiFixSuggestion.d.mts +2 -7
  58. package/Utils/Suggestions/TelemetryAiFixSuggestion.d.ts +2 -7
  59. package/Utils/Suggestions/TelemetryAiFixSuggestion.js +8 -36
  60. package/Utils/Suggestions/TelemetryImprovementSuggestion.d.mts +1 -0
  61. package/Utils/Suggestions/TelemetryImprovementSuggestion.d.ts +1 -0
  62. package/Utils/Suggestions/TelemetryImprovementSuggestion.js +1 -0
  63. package/Utils/Suggestions/TracePerformanceFixSuggestion.d.mts +6 -0
  64. package/Utils/Suggestions/TracePerformanceFixSuggestion.d.ts +6 -0
  65. package/Utils/Suggestions/TracePerformanceFixSuggestion.js +46 -5
  66. package/package.json +8 -1
  67. package/Utils/Monitor/MonitorCheckScheduleUtil.d.mts +0 -61
  68. package/Utils/Monitor/MonitorCheckScheduleUtil.d.ts +0 -61
  69. package/Utils/Monitor/MonitorCheckScheduleUtil.js +0 -476
  70. package/Utils/Monitor/MonitorCheckScheduleUtil.mjs +0 -3
  71. package/Utils/Monitor/MonitorOverviewFamily.d.mts +0 -39
  72. package/Utils/Monitor/MonitorOverviewFamily.d.ts +0 -39
  73. package/Utils/Monitor/MonitorOverviewFamily.js +0 -206
  74. package/Utils/Monitor/MonitorOverviewFamily.mjs +0 -4
  75. package/Utils/Monitor/MonitorOverviewPresentationUtil.d.mts +0 -189
  76. package/Utils/Monitor/MonitorOverviewPresentationUtil.d.ts +0 -189
  77. package/Utils/Monitor/MonitorOverviewPresentationUtil.js +0 -1480
  78. package/Utils/Monitor/MonitorOverviewPresentationUtil.mjs +0 -5
  79. package/Utils/Monitor/MonitorOverviewProbeUtil.d.mts +0 -112
  80. package/Utils/Monitor/MonitorOverviewProbeUtil.d.ts +0 -112
  81. package/Utils/Monitor/MonitorOverviewProbeUtil.js +0 -640
  82. package/Utils/Monitor/MonitorOverviewProbeUtil.mjs +0 -3
  83. package/Utils/Monitor/MonitorStatusHistoryUtil.d.mts +0 -27
  84. package/Utils/Monitor/MonitorStatusHistoryUtil.d.ts +0 -27
  85. package/Utils/Monitor/MonitorStatusHistoryUtil.js +0 -132
  86. package/Utils/Monitor/MonitorStatusHistoryUtil.mjs +0 -2
  87. package/Utils/Monitor/MonitorUptimeSummaryUtil.d.mts +0 -42
  88. package/Utils/Monitor/MonitorUptimeSummaryUtil.d.ts +0 -42
  89. package/Utils/Monitor/MonitorUptimeSummaryUtil.js +0 -468
  90. package/Utils/Monitor/MonitorUptimeSummaryUtil.mjs +0 -2
@@ -1766,7 +1766,7 @@ AutoRemediationRule = __decorate([
1766
1766
  // Terraform's oneuptime_auto_remediation_rule keeps working, deprecated.
1767
1767
  formerSingularName: "Auto Remediation Rule",
1768
1768
  icon: IconProp_1.default.Sparkles,
1769
- tableDescription: "Which new incidents or alerts OneUptime AI investigates and fixes, and how. A rule investigates what it matches (right away, or only if still open after a wait), and fixes it or not, asking first or not. A fix may run the project's runbooks (only the rule's, when it names some), Bash commands on a Runner the rule picks, the tools of the project's external MCP servers (only the rule's, when it names some), and open fix and telemetry pull requests in the project's code repositories (only the rule's, when it names some). With no rule, OneUptime AI investigates every one, and fixes every one while automatic fixing is on. These were auto remediation rules, and investigation rules are AI rules now too. A rule whose Trigger Entity Type is Profile decides the same about the slow code OneUptime finds in a service's profiles, one whose Trigger Entity Type is Trace about the slow and failing operations OneUptime finds in a service's traces, and one whose Trigger Entity Type is Metric about the problems OneUptime finds in a service's metrics, matched by their service; their fix is a pull request in one of the project's code repositories.",
1769
+ tableDescription: "Which new incidents or alerts OneUptime AI investigates and fixes, and how. A rule investigates what it matches (right away, or only if still open after a wait), and fixes it or not, asking first or not. A fix may run the project's runbooks (only the rule's, when it names some), Bash commands on a Runner the rule picks, the tools of the project's external MCP servers (only the rule's, when it names some), and open fix and telemetry pull requests in the project's code repositories (only the rule's, when it names some). With no rule, OneUptime AI investigates every one, and fixes every one while automatic fixing is on. These were auto remediation rules, and investigation rules are AI rules now too. A rule whose Trigger Entity Type is Profile, Trace, Exception, Log or Metric decides the same about the problems OneUptime finds in a service's profiles, traces, exceptions, logs or metrics, matched by their service; their fix is a pull request in one of the project's code repositories.",
1770
1770
  })
1771
1771
  ], AutoRemediationRule);
1772
1772
  exports.default = AutoRemediationRule;
@@ -23,6 +23,7 @@ export default class CodeRepository extends BaseModel {
23
23
  testCommand?: string;
24
24
  runner?: Runner;
25
25
  runnerId?: ObjectID;
26
+ isGlobalRunnerPicked?: boolean;
26
27
  maxOpenFixPullRequests?: number;
27
28
  isGitHubCommandsEnabled?: boolean;
28
29
  gitHubTriggerLabel?: string;
@@ -23,6 +23,7 @@ export default class CodeRepository extends BaseModel {
23
23
  testCommand?: string;
24
24
  runner?: Runner;
25
25
  runnerId?: ObjectID;
26
+ isGlobalRunnerPicked?: boolean;
26
27
  maxOpenFixPullRequests?: number;
27
28
  isGitHubCommandsEnabled?: boolean;
28
29
  gitHubTriggerLabel?: string;
@@ -64,18 +64,24 @@ let CodeRepository = class CodeRepository extends DatabaseBaseModel_1.default {
64
64
  * setup, build and test commands above when an operator set them) and
65
65
  * opens the pull request.
66
66
  * Only that Runner is handed the repository's AI work and a token for it.
67
- * Empty means a global Runner - the one OneUptime runs for every project -
68
- * while the project uses global Runners (Project.useGlobalRunners).
67
+ * Empty means the project's default Runner (below), and otherwise a
68
+ * global Runner - the one OneUptime runs for every project - while the
69
+ * project uses global Runners (Project.useGlobalRunners).
69
70
  *
70
71
  * Only one of the project's own Runners may be picked
71
72
  * (ProjectReferencesService refuses another project's Runner and a global
72
73
  * one; CodeRepositoryService refuses an in-cluster Runner the Kubernetes
73
74
  * agent chart installed, which never clones a repository). A Runner that
74
- * is deleted leaves the repository on a global Runner (SET NULL), as one
75
- * that picks none.
75
+ * is deleted leaves the repository picking none (SET NULL).
76
+ *
77
+ * A repository that picks none follows the project's default Runner
78
+ * (Runner.isProjectDefault) when it has one - unless it picked the Global
79
+ * Runner itself (isGlobalRunnerPicked, below) - and otherwise runs on a
80
+ * global Runner.
76
81
  */
77
82
  this.runner = undefined;
78
83
  this.runnerId = undefined;
84
+ this.isGlobalRunnerPicked = undefined;
79
85
  this.maxOpenFixPullRequests = undefined;
80
86
  this.isGitHubCommandsEnabled = undefined;
81
87
  this.gitHubTriggerLabel = undefined;
@@ -637,7 +643,7 @@ __decorate([
637
643
  type: TableColumnType_1.default.Entity,
638
644
  modelType: Runner_1.default,
639
645
  title: "Runner",
640
- description: "The Runner AI works in this repository on. Empty means a global Runner, one OneUptime runs for every project.",
646
+ description: "The Runner AI works in this repository on. Empty means the project's default Runner when it has one, and otherwise a global Runner, one OneUptime runs for every project.",
641
647
  }),
642
648
  (0, typeorm_1.ManyToOne)(() => {
643
649
  return Runner_1.default;
@@ -685,7 +691,7 @@ __decorate([
685
691
  required: false,
686
692
  canReadOnRelationQuery: true,
687
693
  title: "Runner ID",
688
- description: "ID of the Runner AI works in this repository on: one of the project's own Runners. Empty means a global Runner, one OneUptime runs for every project.",
694
+ description: "ID of the Runner AI works in this repository on: one of the project's own Runners. Empty means the project's default Runner when it has one, and otherwise a global Runner, one OneUptime runs for every project.",
689
695
  }),
690
696
  (0, typeorm_1.Column)({
691
697
  type: ColumnType_1.default.ObjectID,
@@ -694,6 +700,63 @@ __decorate([
694
700
  }),
695
701
  __metadata("design:type", ObjectID_1.default)
696
702
  ], CodeRepository.prototype, "runnerId", void 0);
703
+ __decorate([
704
+ (0, ColumnAccessControl_1.default)({
705
+ create: [
706
+ Permission_1.default.ProjectOwner,
707
+ Permission_1.default.ProjectAdmin,
708
+ Permission_1.default.ProjectMember,
709
+ Permission_1.default.SettingsAdmin,
710
+ Permission_1.default.SettingsMember,
711
+ Permission_1.default.CreateCodeRepository,
712
+ ],
713
+ read: [
714
+ Permission_1.default.ProjectOwner,
715
+ Permission_1.default.ProjectAdmin,
716
+ Permission_1.default.ProjectMember,
717
+ Permission_1.default.Viewer,
718
+ Permission_1.default.SettingsAdmin,
719
+ Permission_1.default.SettingsMember,
720
+ Permission_1.default.SettingsViewer,
721
+ Permission_1.default.ReadCodeRepository,
722
+ ],
723
+ update: [
724
+ Permission_1.default.ProjectOwner,
725
+ Permission_1.default.ProjectAdmin,
726
+ Permission_1.default.ProjectMember,
727
+ Permission_1.default.SettingsAdmin,
728
+ Permission_1.default.SettingsMember,
729
+ Permission_1.default.EditCodeRepository,
730
+ ],
731
+ })
732
+ /*
733
+ * Whether the repository picked the Global Runner itself (its Runner
734
+ * setting in Code), rather than leaving its Runner to the project
735
+ * (Types/Runner/CodeRepositoryRunner). Read only for a repository that
736
+ * picks no Runner (runnerId empty): it then runs on a global Runner even
737
+ * when the project has a default Runner, as a runbook step that picked
738
+ * the Global Runner does. Unset, it follows the project's default Runner,
739
+ * and a global Runner while the project has none.
740
+ *
741
+ * Repositories that picked none in a project that already had a default
742
+ * Runner were set to it when it came in
743
+ * (1807710000000-KeepCodeRepositoriesOnGlobalRunners), so none of them
744
+ * moved off the global Runner they were on.
745
+ */
746
+ ,
747
+ (0, TableColumn_1.default)({
748
+ required: false,
749
+ type: TableColumnType_1.default.Boolean,
750
+ title: "Picks Global Runner",
751
+ description: "Whether this repository runs on a global Runner, one OneUptime runs for every project, even when the project has a default Runner. Read only when the repository picks no Runner of its own. Unset, a repository that picks no Runner follows the project's default Runner, and runs on a global Runner while there is none.",
752
+ example: true,
753
+ }),
754
+ (0, typeorm_1.Column)({
755
+ nullable: true,
756
+ type: ColumnType_1.default.Boolean,
757
+ }),
758
+ __metadata("design:type", Boolean)
759
+ ], CodeRepository.prototype, "isGlobalRunnerPicked", void 0);
697
760
  __decorate([
698
761
  (0, ColumnAccessControl_1.default)({
699
762
  create: [
@@ -175,6 +175,7 @@ export interface CodeTaskOriginJSON {
175
175
  label: string;
176
176
  recordId?: string | undefined;
177
177
  url?: string | undefined;
178
+ insightType?: string | undefined;
178
179
  }
179
180
  export declare enum CodeTaskListKind {
180
181
  Tasks = "tasks",
@@ -175,6 +175,7 @@ export interface CodeTaskOriginJSON {
175
175
  label: string;
176
176
  recordId?: string | undefined;
177
177
  url?: string | undefined;
178
+ insightType?: string | undefined;
178
179
  }
179
180
  export declare enum CodeTaskListKind {
180
181
  Tasks = "tasks",
@@ -53,6 +53,7 @@ export interface TelemetryAiLogEntryJSON {
53
53
  id: string;
54
54
  title: string;
55
55
  serviceName?: string | undefined;
56
+ type?: string | undefined;
56
57
  };
57
58
  requestedBy?: string | undefined;
58
59
  taskId?: string | undefined;
@@ -53,6 +53,7 @@ export interface TelemetryAiLogEntryJSON {
53
53
  id: string;
54
54
  title: string;
55
55
  serviceName?: string | undefined;
56
+ type?: string | undefined;
56
57
  };
57
58
  requestedBy?: string | undefined;
58
59
  taskId?: string | undefined;
@@ -145,6 +145,10 @@ function parseEntry(value) {
145
145
  if (serviceName) {
146
146
  entry.insight.serviceName = serviceName;
147
147
  }
148
+ const insightType = readText(insight["type"]);
149
+ if (insightType) {
150
+ entry.insight.type = insightType;
151
+ }
148
152
  for (const key of [
149
153
  "requestedBy",
150
154
  "taskId",
@@ -0,0 +1,15 @@
1
+ export declare enum CodeRepositorySetting {
2
+ GitHubCommands = "github-commands",
3
+ ProductionReview = "production-review",
4
+ Runner = "runner",
5
+ PullRequests = "pull-requests",
6
+ TriggerLabel = "trigger-label",
7
+ ProductionReviewComment = "production-review-comment",
8
+ Commands = "commands",
9
+ Branches = "branches"
10
+ }
11
+ export declare function getCodeRepositorySettingsPath(data: {
12
+ projectId: string;
13
+ codeRepositoryId: string;
14
+ setting?: CodeRepositorySetting | undefined;
15
+ }): string;
@@ -0,0 +1,15 @@
1
+ export declare enum CodeRepositorySetting {
2
+ GitHubCommands = "github-commands",
3
+ ProductionReview = "production-review",
4
+ Runner = "runner",
5
+ PullRequests = "pull-requests",
6
+ TriggerLabel = "trigger-label",
7
+ ProductionReviewComment = "production-review-comment",
8
+ Commands = "commands",
9
+ Branches = "branches"
10
+ }
11
+ export declare function getCodeRepositorySettingsPath(data: {
12
+ projectId: string;
13
+ codeRepositoryId: string;
14
+ setting?: CodeRepositorySetting | undefined;
15
+ }): string;
@@ -0,0 +1,49 @@
1
+ "use strict";
2
+ /*
3
+ * THE PLACES OF A CODE REPOSITORY'S SETTINGS ON ITS SETTINGS PAGE.
4
+ *
5
+ * Each setting of a repository in Code has a place on its Settings page:
6
+ * its card's id, the key the page's More settings lists it by, and what a
7
+ * link names after the page's "#" to land on it - More settings then opens
8
+ * by itself there (Common/UI/Utils/PageAnchor). "Pick a Runner" opens
9
+ * ".../settings#runner".
10
+ *
11
+ * React-free and server-free, so the Dashboard's page and links
12
+ * (Components/Code/CodeRepositorySettingsCopy, CodePaths) and the server's
13
+ * links into the Dashboard - the GitHub App's answer when a repository's
14
+ * commands are off links straight to its switch - name the same places.
15
+ */
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ exports.CodeRepositorySetting = void 0;
18
+ exports.getCodeRepositorySettingsPath = getCodeRepositorySettingsPath;
19
+ /*
20
+ * The settings of a repository, by their places on its Settings page, in
21
+ * the order the page draws them under More settings.
22
+ */
23
+ var CodeRepositorySetting;
24
+ (function (CodeRepositorySetting) {
25
+ CodeRepositorySetting["GitHubCommands"] = "github-commands";
26
+ CodeRepositorySetting["ProductionReview"] = "production-review";
27
+ CodeRepositorySetting["Runner"] = "runner";
28
+ CodeRepositorySetting["PullRequests"] = "pull-requests";
29
+ CodeRepositorySetting["TriggerLabel"] = "trigger-label";
30
+ CodeRepositorySetting["ProductionReviewComment"] = "production-review-comment";
31
+ // Only on a repository whose operator set build and test commands.
32
+ CodeRepositorySetting["Commands"] = "commands";
33
+ /*
34
+ * A Git repository's Pull Requests: AI pushes a branch there and opens no
35
+ * pull request, so only the branch it starts from is asked.
36
+ */
37
+ CodeRepositorySetting["Branches"] = "branches";
38
+ })(CodeRepositorySetting || (exports.CodeRepositorySetting = CodeRepositorySetting = {}));
39
+ /*
40
+ * A repository's Settings page in the Dashboard, under the Dashboard's own
41
+ * address (DashboardClientUrl, ".../dashboard"), landing on one of its
42
+ * settings when it is named: the route the Dashboard draws it at
43
+ * (RouteMap's PageMap.CODE_REPOSITORY_VIEW_SETTINGS), and the place after
44
+ * its "#".
45
+ */
46
+ function getCodeRepositorySettingsPath(data) {
47
+ const path = `/${encodeURIComponent(data.projectId)}/code/repositories/${encodeURIComponent(data.codeRepositoryId)}/settings`;
48
+ return data.setting ? `${path}#${data.setting}` : path;
49
+ }
@@ -0,0 +1,3 @@
1
+ import commonJsModule from "./CodeRepositorySetting.js";
2
+ export const CodeRepositorySetting = commonJsModule.CodeRepositorySetting;
3
+ export const getCodeRepositorySettingsPath = commonJsModule.getCodeRepositorySettingsPath;
package/Types/Date.d.mts CHANGED
@@ -13,8 +13,12 @@ export default class OneUptimeDate {
13
13
  private static isUtcDateTimeString;
14
14
  private static normalizeUtcDateTimeString;
15
15
  private static getLocalShortMonthName;
16
+ private static getCurrentTimezoneNames;
17
+ private static getTimezoneNames;
18
+ private static getLocalizedDateText;
16
19
  static getSchema(): ZodSchema;
17
20
  static getHoursAndMinutesFromMinutes(minutes: number): string;
21
+ private static formatLocalizedDuration;
18
22
  static fromUnixTimestamp(timestamp: number): Date;
19
23
  static getStartOfTheWeek(date: Date, timezone?: string | undefined): Date;
20
24
  static getEndOfTheWeek(date: Date): Date;
@@ -118,6 +122,7 @@ export default class OneUptimeDate {
118
122
  showWeekday?: boolean | undefined;
119
123
  use12HourFormat?: boolean | undefined;
120
124
  }): string;
125
+ private static getEnglishDateInTimezone;
121
126
  static getDateAsCustomFormattedStringInTimezone(data: {
122
127
  date: Date | string;
123
128
  format: string;
@@ -259,6 +264,7 @@ export default class OneUptimeDate {
259
264
  static secondsToFormattedTimeString(seconds: number): string;
260
265
  static toUnixTimestamp(date: Date): number;
261
266
  static secondsToFormattedFriendlyTimeString(seconds: number): string;
267
+ private static getFriendlyTimeParts;
262
268
  static getGreaterDate(a: Date, b: Date): Date;
263
269
  static getLesserDate(a: Date, b: Date): Date;
264
270
  static getSecondsBetweenDates(start: Date, end: Date): number;
@@ -323,11 +329,15 @@ export default class OneUptimeDate {
323
329
  static getDifferenceInSeconds(date: Date, date2: Date): number;
324
330
  static getDifferenceInMonths(date: Date, date2: Date): number;
325
331
  static convertSecondsToDaysHoursMinutesAndSeconds(seconds: number): string;
332
+ private static getEnglishDaysHoursMinutesAndSeconds;
326
333
  static convertMinutesToDaysHoursAndMinutes(minutes: number): string;
334
+ private static getEnglishDaysHoursAndMinutes;
327
335
  static getHumanizedDurationFromNanoseconds(data: {
328
336
  nanoseconds: number;
329
337
  maxParts?: number;
330
338
  }): string;
339
+ private static withDecimalSeparatorOf;
340
+ private static getEnglishHumanizedDuration;
331
341
  private static formatDurationValue;
332
342
  static getGmtOffsetByTimezone(timezone: Timezone): number;
333
343
  static getGmtOffsetFriendlyStringByTimezone(timezone: Timezone): string;
package/Types/Date.d.ts CHANGED
@@ -13,8 +13,12 @@ export default class OneUptimeDate {
13
13
  private static isUtcDateTimeString;
14
14
  private static normalizeUtcDateTimeString;
15
15
  private static getLocalShortMonthName;
16
+ private static getCurrentTimezoneNames;
17
+ private static getTimezoneNames;
18
+ private static getLocalizedDateText;
16
19
  static getSchema(): ZodSchema;
17
20
  static getHoursAndMinutesFromMinutes(minutes: number): string;
21
+ private static formatLocalizedDuration;
18
22
  static fromUnixTimestamp(timestamp: number): Date;
19
23
  static getStartOfTheWeek(date: Date, timezone?: string | undefined): Date;
20
24
  static getEndOfTheWeek(date: Date): Date;
@@ -118,6 +122,7 @@ export default class OneUptimeDate {
118
122
  showWeekday?: boolean | undefined;
119
123
  use12HourFormat?: boolean | undefined;
120
124
  }): string;
125
+ private static getEnglishDateInTimezone;
121
126
  static getDateAsCustomFormattedStringInTimezone(data: {
122
127
  date: Date | string;
123
128
  format: string;
@@ -259,6 +264,7 @@ export default class OneUptimeDate {
259
264
  static secondsToFormattedTimeString(seconds: number): string;
260
265
  static toUnixTimestamp(date: Date): number;
261
266
  static secondsToFormattedFriendlyTimeString(seconds: number): string;
267
+ private static getFriendlyTimeParts;
262
268
  static getGreaterDate(a: Date, b: Date): Date;
263
269
  static getLesserDate(a: Date, b: Date): Date;
264
270
  static getSecondsBetweenDates(start: Date, end: Date): number;
@@ -323,11 +329,15 @@ export default class OneUptimeDate {
323
329
  static getDifferenceInSeconds(date: Date, date2: Date): number;
324
330
  static getDifferenceInMonths(date: Date, date2: Date): number;
325
331
  static convertSecondsToDaysHoursMinutesAndSeconds(seconds: number): string;
332
+ private static getEnglishDaysHoursMinutesAndSeconds;
326
333
  static convertMinutesToDaysHoursAndMinutes(minutes: number): string;
334
+ private static getEnglishDaysHoursAndMinutes;
327
335
  static getHumanizedDurationFromNanoseconds(data: {
328
336
  nanoseconds: number;
329
337
  maxParts?: number;
330
338
  }): string;
339
+ private static withDecimalSeparatorOf;
340
+ private static getEnglishHumanizedDuration;
331
341
  private static formatDurationValue;
332
342
  static getGmtOffsetByTimezone(timezone: Timezone): number;
333
343
  static getGmtOffsetFriendlyStringByTimezone(timezone: Timezone): string;