feat: интеграция с VPS Tracker
Build, Test, and Push CFDM Docker Image / test (push) Failing after 3m36s
Build, Test, and Push CFDM Docker Image / build-and-push (push) Has been skipped
Build, Test, and Push CFDM Docker Image / update-wiki (push) Has been skipped
Build, Test, and Push CFDM Docker Image / create-release (push) Has been skipped

Исходящий sync bindings после updateConfig, настройки в app_settings, страница Интеграции, приём событий vps_down для DNS failover.

Co-authored-by: Cursor <[email protected]>
This commit is contained in:
Denozordec
2026-06-30 16:45:17 +07:00
co-authored by Cursor
parent 859918fae2
commit 96783386e0
32 changed files with 2116 additions and 243 deletions
+64 -1
View File
@@ -478,6 +478,62 @@ var healthStatusQuerySchema = z.object({
scope: healthCheckScopeSchema,
ref_id: z.coerce.number().int().positive()
});
// src/app-switcher.ts
import { z as z2 } from "zod";
var appSwitcherIconSchema = z2.enum([
"server",
"cloud",
"globe",
"dashboard",
"chart"
]);
var appSwitcherEntrySchema = z2.object({
id: z2.string(),
name: z2.string(),
subtitle: z2.string().optional(),
url: z2.string().url(),
icon: appSwitcherIconSchema.default("server"),
shortcut: z2.string().optional()
});
var appSwitcherConfigSchema = z2.object({
menuLabel: z2.string().default("\u041F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u044F"),
apps: z2.array(appSwitcherEntrySchema).min(1)
});
// src/integration-vps-tracker.ts
import { z as z3 } from "zod";
var cfdmBindingSyncItemSchema = z3.object({
bindingId: z3.number().int().positive(),
serviceId: z3.number().int().positive(),
serviceName: z3.string().min(1),
serviceSlug: z3.string().min(1),
fqdn: z3.string().min(1),
zoneName: z3.string().min(1),
hostname: z3.string(),
ips: z3.array(z3.string()),
deleted: z3.boolean().optional()
});
var cfdmSyncBindingsBodySchema = z3.object({
bindings: z3.array(cfdmBindingSyncItemSchema).min(1)
});
var appSettingsPatchSchema = z3.object({
appSwitcher: appSwitcherConfigSchema.optional(),
vpsTrackerUrl: z3.string().url().or(z3.literal("")).optional(),
vpsTrackerIntegrationToken: z3.string().optional(),
vpsTrackerSyncEnabled: z3.boolean().optional()
});
var vpsTrackerEventSchema = z3.object({
event: z3.enum(["vps_down", "vps_up"]),
vps: z3.array(
z3.object({
id: z3.string().min(1),
ip: z3.string().optional(),
label: z3.string().optional()
})
),
timestamp: z3.string().datetime().optional()
});
export {
CERT_ERROR,
CERT_EXPIRED,
@@ -494,10 +550,16 @@ export {
SYNC_PENDING_PUSH,
SYNC_SYNCED,
ValidationError,
appSettingsPatchSchema,
appSwitcherConfigSchema,
appSwitcherEntrySchema,
appSwitcherIconSchema,
bindingToFqdn,
certMonitoringSchema,
certStatusFromExpiry,
certificateSchema,
cfdmBindingSyncItemSchema,
cfdmSyncBindingsBodySchema,
createDnsRecordSchema,
createDomainSchema,
createGroupSchema,
@@ -543,5 +605,6 @@ export {
updateServiceConfigSchema,
updateServiceGroupSchema,
updateSubdomainSchema,
validateDnsRecord
validateDnsRecord,
vpsTrackerEventSchema
};