@solongate/proxy 0.81.19 → 0.81.20
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/api-client/settings.d.ts +16 -0
- package/dist/commands/index.js +17 -1
- package/dist/index.js +476 -91
- package/dist/tui/hooks.d.ts +14 -0
- package/dist/tui/index.js +464 -91
- package/dist/tui/panels/Settings.d.ts +4 -0
- package/dist/tui/theme.d.ts +4 -0
- package/package.json +1 -1
|
@@ -26,6 +26,13 @@ export declare function getSelfProtection(): Promise<{
|
|
|
26
26
|
export declare function setSelfProtection(enabled: boolean): Promise<{
|
|
27
27
|
enabled: boolean;
|
|
28
28
|
}>;
|
|
29
|
+
export interface LocalLogsConfig {
|
|
30
|
+
enabled: boolean;
|
|
31
|
+
path: string;
|
|
32
|
+
}
|
|
33
|
+
export declare function getLocalLogs(): Promise<LocalLogsConfig>;
|
|
34
|
+
/** The API forces `enabled:false` when `path` is empty — set a path first. */
|
|
35
|
+
export declare function setLocalLogs(cfg: LocalLogsConfig): Promise<LocalLogsConfig>;
|
|
29
36
|
export interface AlertRule {
|
|
30
37
|
id: string;
|
|
31
38
|
name: string;
|
|
@@ -51,6 +58,9 @@ export declare function createAlert(body: Partial<AlertRule> & {
|
|
|
51
58
|
export declare function deleteAlert(id: string): Promise<{
|
|
52
59
|
ok: true;
|
|
53
60
|
}>;
|
|
61
|
+
export declare function setAlertEnabled(id: string, enabled: boolean): Promise<{
|
|
62
|
+
ok: true;
|
|
63
|
+
}>;
|
|
54
64
|
export interface DenialWebhook {
|
|
55
65
|
id: string;
|
|
56
66
|
url: string;
|
|
@@ -72,3 +82,9 @@ export declare function createWebhook(body: {
|
|
|
72
82
|
export declare function deleteWebhook(id: string): Promise<{
|
|
73
83
|
ok: true;
|
|
74
84
|
}>;
|
|
85
|
+
export declare function updateWebhook(id: string, patch: {
|
|
86
|
+
enabled?: boolean;
|
|
87
|
+
events?: DenialWebhook['events'];
|
|
88
|
+
}): Promise<{
|
|
89
|
+
ok: true;
|
|
90
|
+
}>;
|
package/dist/commands/index.js
CHANGED
|
@@ -202,12 +202,16 @@ __export(settings_exports, {
|
|
|
202
202
|
deleteWebhook: () => deleteWebhook,
|
|
203
203
|
getAlerts: () => getAlerts,
|
|
204
204
|
getGuardStatus: () => getGuardStatus,
|
|
205
|
+
getLocalLogs: () => getLocalLogs,
|
|
205
206
|
getRateLimitHistory: () => getRateLimitHistory,
|
|
206
207
|
getSecurityLayers: () => getSecurityLayers,
|
|
207
208
|
getSelfProtection: () => getSelfProtection,
|
|
208
209
|
getWebhooks: () => getWebhooks,
|
|
210
|
+
setAlertEnabled: () => setAlertEnabled,
|
|
211
|
+
setLocalLogs: () => setLocalLogs,
|
|
209
212
|
setSecurityLayers: () => setSecurityLayers,
|
|
210
|
-
setSelfProtection: () => setSelfProtection
|
|
213
|
+
setSelfProtection: () => setSelfProtection,
|
|
214
|
+
updateWebhook: () => updateWebhook
|
|
211
215
|
});
|
|
212
216
|
function getSecurityLayers() {
|
|
213
217
|
return request("GET", "/settings/security-layers");
|
|
@@ -230,6 +234,12 @@ function getSelfProtection() {
|
|
|
230
234
|
function setSelfProtection(enabled) {
|
|
231
235
|
return request("PUT", "/settings/self-protection", { body: { enabled } });
|
|
232
236
|
}
|
|
237
|
+
function getLocalLogs() {
|
|
238
|
+
return request("GET", "/settings/local-logs");
|
|
239
|
+
}
|
|
240
|
+
function setLocalLogs(cfg) {
|
|
241
|
+
return request("PUT", "/settings/local-logs", { body: cfg });
|
|
242
|
+
}
|
|
233
243
|
function getAlerts() {
|
|
234
244
|
return request("GET", "/settings/denial-alerts");
|
|
235
245
|
}
|
|
@@ -239,6 +249,9 @@ function createAlert(body) {
|
|
|
239
249
|
function deleteAlert(id) {
|
|
240
250
|
return request("DELETE", "/settings/denial-alerts", { query: { id } });
|
|
241
251
|
}
|
|
252
|
+
function setAlertEnabled(id, enabled) {
|
|
253
|
+
return request("PATCH", "/settings/denial-alerts", { query: { id }, body: { enabled } });
|
|
254
|
+
}
|
|
242
255
|
function getWebhooks() {
|
|
243
256
|
return request("GET", "/settings/denial-webhook");
|
|
244
257
|
}
|
|
@@ -248,6 +261,9 @@ function createWebhook(body) {
|
|
|
248
261
|
function deleteWebhook(id) {
|
|
249
262
|
return request("DELETE", "/settings/denial-webhook", { query: { id } });
|
|
250
263
|
}
|
|
264
|
+
function updateWebhook(id, patch) {
|
|
265
|
+
return request("PATCH", "/settings/denial-webhook", { body: { id, ...patch } });
|
|
266
|
+
}
|
|
251
267
|
|
|
252
268
|
// src/api-client/stats.ts
|
|
253
269
|
var stats_exports = {};
|