@davidfuchs/mcp-uptime-kuma 0.6.4 → 0.7.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/README.md +76 -449
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +459 -11
- package/dist/server.js.map +1 -1
- package/dist/types/index.d.ts +3 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +6 -0
- package/dist/types/index.js.map +1 -1
- package/dist/types/maintenance.d.ts +70 -0
- package/dist/types/maintenance.d.ts.map +1 -0
- package/dist/types/maintenance.js +22 -0
- package/dist/types/maintenance.js.map +1 -0
- package/dist/types/notification.d.ts +29 -0
- package/dist/types/notification.d.ts.map +1 -0
- package/dist/types/notification.js +14 -0
- package/dist/types/notification.js.map +1 -0
- package/dist/types/status-page.d.ts +46 -0
- package/dist/types/status-page.d.ts.map +1 -0
- package/dist/types/status-page.js +19 -0
- package/dist/types/status-page.js.map +1 -0
- package/dist/uptime-kuma-client.d.ts +110 -1
- package/dist/uptime-kuma-client.d.ts.map +1 -1
- package/dist/uptime-kuma-client.js +324 -4
- package/dist/uptime-kuma-client.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -72
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,cAAc,aAAa,CAAC;AAG5B,cAAc,eAAe,CAAC;AAG9B,cAAc,gBAAgB,CAAC;AAG/B,cAAc,gBAAgB,CAAC;AAG/B,cAAc,WAAW,CAAC;AAG1B,cAAc,mBAAmB,CAAC;AAGlC,cAAc,yBAAyB,CAAC;AAGxC,cAAc,mBAAmB,CAAC;AAGlC,cAAc,oBAAoB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,cAAc,aAAa,CAAC;AAG5B,cAAc,eAAe,CAAC;AAG9B,cAAc,gBAAgB,CAAC;AAG/B,cAAc,gBAAgB,CAAC;AAG/B,cAAc,WAAW,CAAC;AAG1B,cAAc,mBAAmB,CAAC;AAGlC,cAAc,yBAAyB,CAAC;AAGxC,cAAc,mBAAmB,CAAC;AAGlC,cAAc,oBAAoB,CAAC;AAGnC,cAAc,mBAAmB,CAAC;AAGlC,cAAc,kBAAkB,CAAC;AAGjC,cAAc,kBAAkB,CAAC"}
|
package/dist/types/index.js
CHANGED
|
@@ -19,4 +19,10 @@ export * from './monitor-conditions.js';
|
|
|
19
19
|
export * from './monitor-base.js';
|
|
20
20
|
// Monitor Type Schemas (all specific monitor types, Monitor, MonitorCreate, MonitorUpdate, MonitorBaseWithExtendedData, MonitorWithExtendedData, MonitorRawData)
|
|
21
21
|
export * from './monitor-types.js';
|
|
22
|
+
// Notification schemas
|
|
23
|
+
export * from './notification.js';
|
|
24
|
+
// Maintenance window schemas
|
|
25
|
+
export * from './maintenance.js';
|
|
26
|
+
// Status page schemas
|
|
27
|
+
export * from './status-page.js';
|
|
22
28
|
//# sourceMappingURL=index.js.map
|
package/dist/types/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,gBAAgB;AAChB,cAAc,aAAa,CAAC;AAE5B,WAAW;AACX,cAAc,eAAe,CAAC;AAE9B,8DAA8D;AAC9D,cAAc,gBAAgB,CAAC;AAE/B,aAAa;AACb,cAAc,gBAAgB,CAAC;AAE/B,OAAO;AACP,cAAc,WAAW,CAAC;AAE1B,2CAA2C;AAC3C,cAAc,mBAAmB,CAAC;AAElC,qBAAqB;AACrB,cAAc,yBAAyB,CAAC;AAExC,2DAA2D;AAC3D,cAAc,mBAAmB,CAAC;AAElC,iKAAiK;AACjK,cAAc,oBAAoB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,gBAAgB;AAChB,cAAc,aAAa,CAAC;AAE5B,WAAW;AACX,cAAc,eAAe,CAAC;AAE9B,8DAA8D;AAC9D,cAAc,gBAAgB,CAAC;AAE/B,aAAa;AACb,cAAc,gBAAgB,CAAC;AAE/B,OAAO;AACP,cAAc,WAAW,CAAC;AAE1B,2CAA2C;AAC3C,cAAc,mBAAmB,CAAC;AAElC,qBAAqB;AACrB,cAAc,yBAAyB,CAAC;AAExC,2DAA2D;AAC3D,cAAc,mBAAmB,CAAC;AAElC,iKAAiK;AACjK,cAAc,oBAAoB,CAAC;AAEnC,uBAAuB;AACvB,cAAc,mBAAmB,CAAC;AAElC,6BAA6B;AAC7B,cAAc,kBAAkB,CAAC;AAEjC,sBAAsB;AACtB,cAAc,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* Maintenance window schema
|
|
4
|
+
*/
|
|
5
|
+
export declare const MaintenanceSchema: z.ZodObject<{
|
|
6
|
+
id: z.ZodOptional<z.ZodNumber>;
|
|
7
|
+
title: z.ZodString;
|
|
8
|
+
description: z.ZodOptional<z.ZodString>;
|
|
9
|
+
strategy: z.ZodOptional<z.ZodEnum<["single", "recurring-interval", "recurring-weekday", "recurring-day-of-month", "manual"]>>;
|
|
10
|
+
active: z.ZodOptional<z.ZodBoolean>;
|
|
11
|
+
timezone: z.ZodOptional<z.ZodString>;
|
|
12
|
+
dateRange: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
13
|
+
timeRange: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
14
|
+
hours: z.ZodNumber;
|
|
15
|
+
minutes: z.ZodNumber;
|
|
16
|
+
}, "strip", z.ZodTypeAny, {
|
|
17
|
+
hours: number;
|
|
18
|
+
minutes: number;
|
|
19
|
+
}, {
|
|
20
|
+
hours: number;
|
|
21
|
+
minutes: number;
|
|
22
|
+
}>, "many">>;
|
|
23
|
+
weekdays: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
|
|
24
|
+
daysOfMonth: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
|
|
25
|
+
intervalDay: z.ZodOptional<z.ZodNumber>;
|
|
26
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
27
|
+
id: z.ZodOptional<z.ZodNumber>;
|
|
28
|
+
title: z.ZodString;
|
|
29
|
+
description: z.ZodOptional<z.ZodString>;
|
|
30
|
+
strategy: z.ZodOptional<z.ZodEnum<["single", "recurring-interval", "recurring-weekday", "recurring-day-of-month", "manual"]>>;
|
|
31
|
+
active: z.ZodOptional<z.ZodBoolean>;
|
|
32
|
+
timezone: z.ZodOptional<z.ZodString>;
|
|
33
|
+
dateRange: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
34
|
+
timeRange: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
35
|
+
hours: z.ZodNumber;
|
|
36
|
+
minutes: z.ZodNumber;
|
|
37
|
+
}, "strip", z.ZodTypeAny, {
|
|
38
|
+
hours: number;
|
|
39
|
+
minutes: number;
|
|
40
|
+
}, {
|
|
41
|
+
hours: number;
|
|
42
|
+
minutes: number;
|
|
43
|
+
}>, "many">>;
|
|
44
|
+
weekdays: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
|
|
45
|
+
daysOfMonth: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
|
|
46
|
+
intervalDay: z.ZodOptional<z.ZodNumber>;
|
|
47
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
48
|
+
id: z.ZodOptional<z.ZodNumber>;
|
|
49
|
+
title: z.ZodString;
|
|
50
|
+
description: z.ZodOptional<z.ZodString>;
|
|
51
|
+
strategy: z.ZodOptional<z.ZodEnum<["single", "recurring-interval", "recurring-weekday", "recurring-day-of-month", "manual"]>>;
|
|
52
|
+
active: z.ZodOptional<z.ZodBoolean>;
|
|
53
|
+
timezone: z.ZodOptional<z.ZodString>;
|
|
54
|
+
dateRange: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
55
|
+
timeRange: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
56
|
+
hours: z.ZodNumber;
|
|
57
|
+
minutes: z.ZodNumber;
|
|
58
|
+
}, "strip", z.ZodTypeAny, {
|
|
59
|
+
hours: number;
|
|
60
|
+
minutes: number;
|
|
61
|
+
}, {
|
|
62
|
+
hours: number;
|
|
63
|
+
minutes: number;
|
|
64
|
+
}>, "many">>;
|
|
65
|
+
weekdays: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
|
|
66
|
+
daysOfMonth: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
|
|
67
|
+
intervalDay: z.ZodOptional<z.ZodNumber>;
|
|
68
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
69
|
+
export type Maintenance = z.infer<typeof MaintenanceSchema>;
|
|
70
|
+
//# sourceMappingURL=maintenance.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"maintenance.d.ts","sourceRoot":"","sources":["../../src/types/maintenance.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;GAEG;AACH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gCAgBd,CAAC;AAEjB,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* Maintenance window schema
|
|
4
|
+
*/
|
|
5
|
+
export const MaintenanceSchema = z.object({
|
|
6
|
+
id: z.number().optional().describe('Maintenance ID (assigned by server)'),
|
|
7
|
+
title: z.string().describe('Title of the maintenance window'),
|
|
8
|
+
description: z.string().optional().describe('Description of the maintenance'),
|
|
9
|
+
strategy: z.enum(['single', 'recurring-interval', 'recurring-weekday', 'recurring-day-of-month', 'manual']).optional()
|
|
10
|
+
.describe('Scheduling strategy'),
|
|
11
|
+
active: z.boolean().optional().describe('Whether the maintenance window is active'),
|
|
12
|
+
timezone: z.string().optional().describe('Timezone for the maintenance window'),
|
|
13
|
+
dateRange: z.array(z.string()).optional().describe('Date range [startDate, endDate] in ISO format'),
|
|
14
|
+
timeRange: z.array(z.object({
|
|
15
|
+
hours: z.number(),
|
|
16
|
+
minutes: z.number(),
|
|
17
|
+
})).optional().describe('Time range within the day'),
|
|
18
|
+
weekdays: z.array(z.number()).optional().describe('Days of week (0=Sunday, 6=Saturday)'),
|
|
19
|
+
daysOfMonth: z.array(z.number()).optional().describe('Days of month (1-31)'),
|
|
20
|
+
intervalDay: z.number().optional().describe('Interval in days for recurring-interval strategy'),
|
|
21
|
+
}).passthrough();
|
|
22
|
+
//# sourceMappingURL=maintenance.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"maintenance.js","sourceRoot":"","sources":["../../src/types/maintenance.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;GAEG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,CAAC,MAAM,CAAC;IACxC,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,qCAAqC,CAAC;IACzE,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,iCAAiC,CAAC;IAC7D,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,gCAAgC,CAAC;IAC7E,QAAQ,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,wBAAwB,EAAE,QAAQ,CAAC,CAAC,CAAC,QAAQ,EAAE;SACnH,QAAQ,CAAC,qBAAqB,CAAC;IAClC,MAAM,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,0CAA0C,CAAC;IACnF,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,qCAAqC,CAAC;IAC/E,SAAS,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,+CAA+C,CAAC;IACnG,SAAS,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC;QAC1B,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;QACjB,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE;KACpB,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,2BAA2B,CAAC;IACpD,QAAQ,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,qCAAqC,CAAC;IACxF,WAAW,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,sBAAsB,CAAC;IAC5E,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,kDAAkD,CAAC;CAChG,CAAC,CAAC,WAAW,EAAE,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* Notification configuration schema
|
|
4
|
+
* Covers common fields for all notification types (Slack, ntfy, Discord, etc.)
|
|
5
|
+
*/
|
|
6
|
+
export declare const NotificationSchema: z.ZodObject<{
|
|
7
|
+
id: z.ZodOptional<z.ZodNumber>;
|
|
8
|
+
name: z.ZodOptional<z.ZodString>;
|
|
9
|
+
type: z.ZodOptional<z.ZodString>;
|
|
10
|
+
isDefault: z.ZodOptional<z.ZodBoolean>;
|
|
11
|
+
applyExisting: z.ZodOptional<z.ZodBoolean>;
|
|
12
|
+
active: z.ZodOptional<z.ZodBoolean>;
|
|
13
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
14
|
+
id: z.ZodOptional<z.ZodNumber>;
|
|
15
|
+
name: z.ZodOptional<z.ZodString>;
|
|
16
|
+
type: z.ZodOptional<z.ZodString>;
|
|
17
|
+
isDefault: z.ZodOptional<z.ZodBoolean>;
|
|
18
|
+
applyExisting: z.ZodOptional<z.ZodBoolean>;
|
|
19
|
+
active: z.ZodOptional<z.ZodBoolean>;
|
|
20
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
21
|
+
id: z.ZodOptional<z.ZodNumber>;
|
|
22
|
+
name: z.ZodOptional<z.ZodString>;
|
|
23
|
+
type: z.ZodOptional<z.ZodString>;
|
|
24
|
+
isDefault: z.ZodOptional<z.ZodBoolean>;
|
|
25
|
+
applyExisting: z.ZodOptional<z.ZodBoolean>;
|
|
26
|
+
active: z.ZodOptional<z.ZodBoolean>;
|
|
27
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
28
|
+
export type Notification = z.infer<typeof NotificationSchema>;
|
|
29
|
+
//# sourceMappingURL=notification.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"notification.d.ts","sourceRoot":"","sources":["../../src/types/notification.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;GAGG;AACH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;gCAOf,CAAC;AAEjB,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* Notification configuration schema
|
|
4
|
+
* Covers common fields for all notification types (Slack, ntfy, Discord, etc.)
|
|
5
|
+
*/
|
|
6
|
+
export const NotificationSchema = z.object({
|
|
7
|
+
id: z.number().optional().describe('Notification ID (assigned by server)'),
|
|
8
|
+
name: z.string().optional().describe('Human-readable name for this notification channel'),
|
|
9
|
+
type: z.string().optional().describe('Notification type (e.g. slack, ntfy, discord, telegram, email, webhook)'),
|
|
10
|
+
isDefault: z.boolean().optional().describe('Whether this notification is enabled by default for new monitors'),
|
|
11
|
+
applyExisting: z.boolean().optional().describe('Apply this notification to all existing monitors'),
|
|
12
|
+
active: z.boolean().optional().describe('Whether this notification is active'),
|
|
13
|
+
}).passthrough();
|
|
14
|
+
//# sourceMappingURL=notification.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"notification.js","sourceRoot":"","sources":["../../src/types/notification.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;GAGG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,CAAC,MAAM,CAAC;IACzC,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,sCAAsC,CAAC;IAC1E,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,mDAAmD,CAAC;IACzF,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,yEAAyE,CAAC;IAC/G,SAAS,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,kEAAkE,CAAC;IAC9G,aAAa,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,kDAAkD,CAAC;IAClG,MAAM,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,qCAAqC,CAAC;CAC/E,CAAC,CAAC,WAAW,EAAE,CAAC"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* Status page schema
|
|
4
|
+
*/
|
|
5
|
+
export declare const StatusPageSchema: z.ZodObject<{
|
|
6
|
+
id: z.ZodOptional<z.ZodNumber>;
|
|
7
|
+
slug: z.ZodString;
|
|
8
|
+
title: z.ZodString;
|
|
9
|
+
description: z.ZodOptional<z.ZodString>;
|
|
10
|
+
theme: z.ZodOptional<z.ZodString>;
|
|
11
|
+
published: z.ZodOptional<z.ZodBoolean>;
|
|
12
|
+
showTags: z.ZodOptional<z.ZodBoolean>;
|
|
13
|
+
domainNameList: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
14
|
+
customCSS: z.ZodOptional<z.ZodString>;
|
|
15
|
+
footerText: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
16
|
+
showPoweredBy: z.ZodOptional<z.ZodBoolean>;
|
|
17
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
18
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
19
|
+
id: z.ZodOptional<z.ZodNumber>;
|
|
20
|
+
slug: z.ZodString;
|
|
21
|
+
title: z.ZodString;
|
|
22
|
+
description: z.ZodOptional<z.ZodString>;
|
|
23
|
+
theme: z.ZodOptional<z.ZodString>;
|
|
24
|
+
published: z.ZodOptional<z.ZodBoolean>;
|
|
25
|
+
showTags: z.ZodOptional<z.ZodBoolean>;
|
|
26
|
+
domainNameList: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
27
|
+
customCSS: z.ZodOptional<z.ZodString>;
|
|
28
|
+
footerText: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
29
|
+
showPoweredBy: z.ZodOptional<z.ZodBoolean>;
|
|
30
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
31
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
32
|
+
id: z.ZodOptional<z.ZodNumber>;
|
|
33
|
+
slug: z.ZodString;
|
|
34
|
+
title: z.ZodString;
|
|
35
|
+
description: z.ZodOptional<z.ZodString>;
|
|
36
|
+
theme: z.ZodOptional<z.ZodString>;
|
|
37
|
+
published: z.ZodOptional<z.ZodBoolean>;
|
|
38
|
+
showTags: z.ZodOptional<z.ZodBoolean>;
|
|
39
|
+
domainNameList: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
40
|
+
customCSS: z.ZodOptional<z.ZodString>;
|
|
41
|
+
footerText: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
42
|
+
showPoweredBy: z.ZodOptional<z.ZodBoolean>;
|
|
43
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
44
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
45
|
+
export type StatusPage = z.infer<typeof StatusPageSchema>;
|
|
46
|
+
//# sourceMappingURL=status-page.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"status-page.d.ts","sourceRoot":"","sources":["../../src/types/status-page.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;GAEG;AACH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gCAab,CAAC;AAEjB,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* Status page schema
|
|
4
|
+
*/
|
|
5
|
+
export const StatusPageSchema = z.object({
|
|
6
|
+
id: z.number().optional().describe('Status page ID'),
|
|
7
|
+
slug: z.string().describe('URL slug for the status page'),
|
|
8
|
+
title: z.string().describe('Title of the status page'),
|
|
9
|
+
description: z.string().optional().describe('Description shown on the status page'),
|
|
10
|
+
theme: z.string().optional().describe('Theme (light or dark)'),
|
|
11
|
+
published: z.boolean().optional().describe('Whether the status page is publicly accessible'),
|
|
12
|
+
showTags: z.boolean().optional().describe('Whether to show tags on the status page'),
|
|
13
|
+
domainNameList: z.array(z.string()).optional().describe('Custom domain names for this status page'),
|
|
14
|
+
customCSS: z.string().optional().describe('Custom CSS for the status page'),
|
|
15
|
+
footerText: z.string().optional().nullable().describe('Footer text'),
|
|
16
|
+
showPoweredBy: z.boolean().optional().describe('Whether to show Uptime Kuma branding'),
|
|
17
|
+
icon: z.string().optional().describe('Icon URL or path'),
|
|
18
|
+
}).passthrough();
|
|
19
|
+
//# sourceMappingURL=status-page.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"status-page.js","sourceRoot":"","sources":["../../src/types/status-page.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;GAEG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,CAAC,MAAM,CAAC;IACvC,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,gBAAgB,CAAC;IACpD,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,8BAA8B,CAAC;IACzD,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,0BAA0B,CAAC;IACtD,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,sCAAsC,CAAC;IACnF,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,uBAAuB,CAAC;IAC9D,SAAS,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,gDAAgD,CAAC;IAC5F,QAAQ,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,yCAAyC,CAAC;IACpF,cAAc,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,0CAA0C,CAAC;IACnG,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,gCAAgC,CAAC;IAC3E,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,aAAa,CAAC;IACpE,aAAa,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,sCAAsC,CAAC;IACtF,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,kBAAkB,CAAC;CACzD,CAAC,CAAC,WAAW,EAAE,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Socket } from 'socket.io-client';
|
|
2
2
|
import type { LoggingLevel } from '@modelcontextprotocol/sdk/types.js';
|
|
3
|
-
import type { MonitorBaseWithExtendedData, MonitorWithExtendedData, ApiResponse, LoginResponse, MonitorList, MonitorSummary, Heartbeat, GetSettingsResponse } from './types/index.js';
|
|
3
|
+
import type { MonitorBaseWithExtendedData, MonitorWithExtendedData, ApiResponse, LoginResponse, MonitorList, MonitorSummary, Heartbeat, GetSettingsResponse, Notification, Maintenance, StatusPage } from './types/index.js';
|
|
4
4
|
/**
|
|
5
5
|
* Uptime Kuma Socket.io API Client
|
|
6
6
|
*/
|
|
@@ -11,8 +11,13 @@ export declare class UptimeKumaClient {
|
|
|
11
11
|
private heartbeatListCache;
|
|
12
12
|
private uptimeCache;
|
|
13
13
|
private avgPingCache;
|
|
14
|
+
private notificationListCache;
|
|
15
|
+
private tagListCache;
|
|
16
|
+
private maintenanceListCache;
|
|
17
|
+
private statusPageListCache;
|
|
14
18
|
private server?;
|
|
15
19
|
private shouldLog;
|
|
20
|
+
private loginCredentials;
|
|
16
21
|
constructor(url: string, server?: {
|
|
17
22
|
sendLoggingMessage: (params: {
|
|
18
23
|
level: LoggingLevel;
|
|
@@ -27,6 +32,14 @@ export declare class UptimeKumaClient {
|
|
|
27
32
|
* Connect to the Uptime Kuma server
|
|
28
33
|
*/
|
|
29
34
|
connect(): Promise<void>;
|
|
35
|
+
/**
|
|
36
|
+
* Re-authenticate after a reconnection to refresh all cached data.
|
|
37
|
+
* When the server restarts or the connection drops, Socket.IO reconnects
|
|
38
|
+
* the transport but the server no longer considers the client authenticated.
|
|
39
|
+
* Without re-emitting login, the server won't send monitorList or heartbeat
|
|
40
|
+
* events, leaving the cache permanently stale.
|
|
41
|
+
*/
|
|
42
|
+
private reauthenticate;
|
|
30
43
|
/**
|
|
31
44
|
* Disconnect from the Uptime Kuma server
|
|
32
45
|
*/
|
|
@@ -131,6 +144,102 @@ export declare class UptimeKumaClient {
|
|
|
131
144
|
tags?: string;
|
|
132
145
|
status?: string;
|
|
133
146
|
}): MonitorSummary[];
|
|
147
|
+
private setupNotificationListListeners;
|
|
148
|
+
private setupTagListListeners;
|
|
149
|
+
private setupMaintenanceListListeners;
|
|
150
|
+
private setupStatusPageListListeners;
|
|
151
|
+
/**
|
|
152
|
+
* Create a new monitor
|
|
153
|
+
*
|
|
154
|
+
* @param monitorData - Monitor configuration (type-specific fields should be included)
|
|
155
|
+
* @returns Promise resolving to the API response with the new monitorID
|
|
156
|
+
*/
|
|
157
|
+
createMonitor(monitorData: Record<string, unknown>): Promise<ApiResponse & {
|
|
158
|
+
monitorID?: number;
|
|
159
|
+
}>;
|
|
160
|
+
/**
|
|
161
|
+
* Update an existing monitor
|
|
162
|
+
*
|
|
163
|
+
* @param monitorData - Monitor configuration including the id field
|
|
164
|
+
* @returns Promise resolving to the API response
|
|
165
|
+
*/
|
|
166
|
+
updateMonitor(monitorData: Record<string, unknown>): Promise<ApiResponse & {
|
|
167
|
+
monitorID?: number;
|
|
168
|
+
}>;
|
|
169
|
+
/**
|
|
170
|
+
* Delete a monitor
|
|
171
|
+
*
|
|
172
|
+
* @param monitorID - The ID of the monitor to delete
|
|
173
|
+
* @returns Promise resolving to the API response
|
|
174
|
+
*/
|
|
175
|
+
deleteMonitor(monitorID: number): Promise<ApiResponse>;
|
|
176
|
+
/**
|
|
177
|
+
* Get the cached notification list
|
|
178
|
+
*/
|
|
179
|
+
getNotificationList(): Notification[];
|
|
180
|
+
/**
|
|
181
|
+
* Add or update a notification channel
|
|
182
|
+
*
|
|
183
|
+
* @param notification - Notification configuration
|
|
184
|
+
* @param notificationID - If provided, updates existing; otherwise creates new
|
|
185
|
+
* @returns Promise resolving to the API response with the notification id
|
|
186
|
+
*/
|
|
187
|
+
addNotification(notification: Record<string, unknown>, notificationID?: number): Promise<ApiResponse & {
|
|
188
|
+
id?: number;
|
|
189
|
+
}>;
|
|
190
|
+
/**
|
|
191
|
+
* Delete a notification channel
|
|
192
|
+
*
|
|
193
|
+
* @param notificationID - The ID of the notification to delete
|
|
194
|
+
* @returns Promise resolving to the API response
|
|
195
|
+
*/
|
|
196
|
+
deleteNotification(notificationID: number): Promise<ApiResponse>;
|
|
197
|
+
/**
|
|
198
|
+
* Get the cached tag list
|
|
199
|
+
*/
|
|
200
|
+
getTagList(): Array<{
|
|
201
|
+
id: number;
|
|
202
|
+
name: string;
|
|
203
|
+
color: string;
|
|
204
|
+
}>;
|
|
205
|
+
/**
|
|
206
|
+
* Create a new tag
|
|
207
|
+
*
|
|
208
|
+
* @param name - Tag name
|
|
209
|
+
* @param color - Tag color (hex string, e.g. '#ff0000')
|
|
210
|
+
* @returns Promise resolving to the created tag object
|
|
211
|
+
*/
|
|
212
|
+
addTag(name: string, color: string): Promise<ApiResponse & {
|
|
213
|
+
tag?: {
|
|
214
|
+
id: number;
|
|
215
|
+
name: string;
|
|
216
|
+
color: string;
|
|
217
|
+
};
|
|
218
|
+
}>;
|
|
219
|
+
/**
|
|
220
|
+
* Delete a tag
|
|
221
|
+
*
|
|
222
|
+
* @param tagID - The ID of the tag to delete
|
|
223
|
+
* @returns Promise resolving to the API response
|
|
224
|
+
*/
|
|
225
|
+
deleteTag(tagID: number): Promise<ApiResponse>;
|
|
226
|
+
/**
|
|
227
|
+
* Get the cached maintenance window list
|
|
228
|
+
*/
|
|
229
|
+
getMaintenanceList(): Maintenance[];
|
|
230
|
+
/**
|
|
231
|
+
* Create a new maintenance window
|
|
232
|
+
*
|
|
233
|
+
* @param maintenanceData - Maintenance window configuration
|
|
234
|
+
* @returns Promise resolving to the API response with the maintenance ID
|
|
235
|
+
*/
|
|
236
|
+
createMaintenance(maintenanceData: Record<string, unknown>): Promise<ApiResponse & {
|
|
237
|
+
maintenanceID?: number;
|
|
238
|
+
}>;
|
|
239
|
+
/**
|
|
240
|
+
* Get the cached status page list
|
|
241
|
+
*/
|
|
242
|
+
getStatusPageList(): StatusPage[];
|
|
134
243
|
/**
|
|
135
244
|
* Get the socket instance (for advanced usage)
|
|
136
245
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"uptime-kuma-client.d.ts","sourceRoot":"","sources":["../src/uptime-kuma-client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAM,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAE9C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC;AACvE,OAAO,KAAK,EAEV,2BAA2B,EAC3B,uBAAuB,EAGvB,WAAW,EACX,aAAa,EAEb,WAAW,EACX,cAAc,EACd,SAAS,EAET,mBAAmB,
|
|
1
|
+
{"version":3,"file":"uptime-kuma-client.d.ts","sourceRoot":"","sources":["../src/uptime-kuma-client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAM,MAAM,EAAE,MAAM,kBAAkB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