Add SNMP credential profiles

This commit is contained in:
Keith Smith
2026-05-23 20:11:09 -06:00
parent 19d4c6e603
commit 0cbc6b6ea8
10 changed files with 535 additions and 16 deletions
+18
View File
@@ -10,6 +10,9 @@ import type {
NotificationChannelCreate,
NotificationChannelUpdate,
PingMonitorCreate,
SnmpCredentialProfile,
SnmpCredentialProfileCreate,
SnmpCredentialProfileUpdate,
TcpMonitorCreate,
User,
WebsiteMonitorCreate,
@@ -121,4 +124,19 @@ export const api = {
request<void>(`/notifications/channels/${channelId}`, token, {
method: "DELETE",
}),
snmpCredentialProfiles: (token: string) => request<SnmpCredentialProfile[]>("/credentials/snmp", token),
createSnmpCredentialProfile: (token: string, payload: SnmpCredentialProfileCreate) =>
request<SnmpCredentialProfile>("/credentials/snmp", token, {
method: "POST",
body: JSON.stringify(payload),
}),
updateSnmpCredentialProfile: (token: string, profileId: number, payload: SnmpCredentialProfileUpdate) =>
request<SnmpCredentialProfile>(`/credentials/snmp/${profileId}`, token, {
method: "PATCH",
body: JSON.stringify(payload),
}),
deleteSnmpCredentialProfile: (token: string, profileId: number) =>
request<void>(`/credentials/snmp/${profileId}`, token, {
method: "DELETE",
}),
};