@solongate/proxy 0.81.55 → 0.81.57
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/client.d.ts +2 -0
- package/dist/api-client/settings.d.ts +15 -0
- package/dist/commands/index.js +8 -0
- package/dist/index.js +362 -168
- package/dist/tui/index.js +361 -167
- package/package.json +1 -1
|
@@ -15,6 +15,8 @@ export interface SavedAccount {
|
|
|
15
15
|
export declare function listAccounts(): SavedAccount[];
|
|
16
16
|
/** Upsert an account (dedupe by apiKey). Called from `login`. */
|
|
17
17
|
export declare function saveAccount(acc: SavedAccount): void;
|
|
18
|
+
/** Remove a saved account from this device (does NOT revoke the cloud key). */
|
|
19
|
+
export declare function removeAccount(apiKey: string): void;
|
|
18
20
|
export declare function setViewCredentials(creds: Credentials | null): void;
|
|
19
21
|
/** True when the given key is the ACTIVE one the guard hooks use. */
|
|
20
22
|
export declare function isActiveAccount(apiKey: string): boolean;
|
|
@@ -61,6 +61,21 @@ export declare function deleteAlert(id: string): Promise<{
|
|
|
61
61
|
export declare function setAlertEnabled(id: string, enabled: boolean): Promise<{
|
|
62
62
|
ok: true;
|
|
63
63
|
}>;
|
|
64
|
+
export declare function updateAlert(id: string, patch: {
|
|
65
|
+
signal?: AlertRule['signal'];
|
|
66
|
+
threshold?: number;
|
|
67
|
+
windowSeconds?: number;
|
|
68
|
+
emails?: string[];
|
|
69
|
+
telegram?: string[];
|
|
70
|
+
}): Promise<{
|
|
71
|
+
rule: AlertRule;
|
|
72
|
+
}>;
|
|
73
|
+
export declare function sendTestAlert(id: string): Promise<{
|
|
74
|
+
delivered: {
|
|
75
|
+
telegram: boolean;
|
|
76
|
+
email: boolean;
|
|
77
|
+
};
|
|
78
|
+
}>;
|
|
64
79
|
export interface DenialWebhook {
|
|
65
80
|
id: string;
|
|
66
81
|
url: string;
|
package/dist/commands/index.js
CHANGED
|
@@ -221,11 +221,13 @@ __export(settings_exports, {
|
|
|
221
221
|
getSecurityLayers: () => getSecurityLayers,
|
|
222
222
|
getSelfProtection: () => getSelfProtection,
|
|
223
223
|
getWebhooks: () => getWebhooks,
|
|
224
|
+
sendTestAlert: () => sendTestAlert,
|
|
224
225
|
sendTestWebhook: () => sendTestWebhook,
|
|
225
226
|
setAlertEnabled: () => setAlertEnabled,
|
|
226
227
|
setLocalLogs: () => setLocalLogs,
|
|
227
228
|
setSecurityLayers: () => setSecurityLayers,
|
|
228
229
|
setSelfProtection: () => setSelfProtection,
|
|
230
|
+
updateAlert: () => updateAlert,
|
|
229
231
|
updateWebhook: () => updateWebhook
|
|
230
232
|
});
|
|
231
233
|
function getSecurityLayers() {
|
|
@@ -267,6 +269,12 @@ function deleteAlert(id) {
|
|
|
267
269
|
function setAlertEnabled(id, enabled) {
|
|
268
270
|
return request("PATCH", "/settings/denial-alerts", { query: { id }, body: { enabled } });
|
|
269
271
|
}
|
|
272
|
+
function updateAlert(id, patch) {
|
|
273
|
+
return request("PATCH", "/settings/denial-alerts", { query: { id }, body: patch });
|
|
274
|
+
}
|
|
275
|
+
function sendTestAlert(id) {
|
|
276
|
+
return request("POST", "/settings/denial-alerts/send-test", { body: { id } });
|
|
277
|
+
}
|
|
270
278
|
function getWebhooks() {
|
|
271
279
|
return request("GET", "/settings/denial-webhook");
|
|
272
280
|
}
|