datadog-mcp 1.0.7 → 1.0.8
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/dist/index.js +24 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3270,7 +3270,30 @@ async function getDowntime(api, id) {
|
|
|
3270
3270
|
};
|
|
3271
3271
|
}
|
|
3272
3272
|
function normalizeDowntimeConfig(config) {
|
|
3273
|
-
const
|
|
3273
|
+
const keyMapping = {
|
|
3274
|
+
monitor_identifier: "monitorIdentifier",
|
|
3275
|
+
display_timezone: "displayTimezone",
|
|
3276
|
+
mute_first_recovery_notification: "muteFirstRecoveryNotification",
|
|
3277
|
+
notify_end_states: "notifyEndStates",
|
|
3278
|
+
notify_end_types: "notifyEndTypes"
|
|
3279
|
+
};
|
|
3280
|
+
const normalized = {};
|
|
3281
|
+
for (const [key, value] of Object.entries(config)) {
|
|
3282
|
+
const newKey = keyMapping[key] || key;
|
|
3283
|
+
normalized[newKey] = value;
|
|
3284
|
+
}
|
|
3285
|
+
if (normalized.monitorIdentifier && typeof normalized.monitorIdentifier === "object") {
|
|
3286
|
+
const mi = { ...normalized.monitorIdentifier };
|
|
3287
|
+
if ("monitor_id" in mi) {
|
|
3288
|
+
mi.monitorId = mi.monitor_id;
|
|
3289
|
+
delete mi.monitor_id;
|
|
3290
|
+
}
|
|
3291
|
+
if ("monitor_tags" in mi) {
|
|
3292
|
+
mi.monitorTags = mi.monitor_tags;
|
|
3293
|
+
delete mi.monitor_tags;
|
|
3294
|
+
}
|
|
3295
|
+
normalized.monitorIdentifier = mi;
|
|
3296
|
+
}
|
|
3274
3297
|
if (normalized.schedule && typeof normalized.schedule === "object") {
|
|
3275
3298
|
const schedule = { ...normalized.schedule };
|
|
3276
3299
|
const isRecurring = "duration" in schedule && "rrule" in schedule;
|