mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-17 14:40:39 +00:00
feat(secret-sync): add PR suggestions for Zabbix secret sync
This commit is contained in:
+7
-3
@@ -1,7 +1,7 @@
|
||||
import { z } from "zod";
|
||||
|
||||
import { BaseSecretSyncSchema } from "@app/components/secret-syncs/forms/schemas/base-secret-sync-schema";
|
||||
import { ZabbixSyncScope } from "@app/hooks/api/appConnections/zabbix";
|
||||
import { ZabbixMacroType, ZabbixSyncScope } from "@app/hooks/api/appConnections/zabbix";
|
||||
import { SecretSync } from "@app/hooks/api/secretSyncs";
|
||||
|
||||
export const ZabbixSyncDestinationSchema = BaseSecretSyncSchema().merge(
|
||||
@@ -12,11 +12,15 @@ export const ZabbixSyncDestinationSchema = BaseSecretSyncSchema().merge(
|
||||
scope: z.literal(ZabbixSyncScope.Host),
|
||||
hostId: z.string().trim().min(1, "Host ID required"),
|
||||
hostName: z.string().trim().min(1, "Host name required"),
|
||||
macroType: z.number().min(0, "Macro type required").max(1, "Macro type required")
|
||||
macroType: z.nativeEnum(ZabbixMacroType, {
|
||||
errorMap: () => ({ message: "Macro type must be either 'text' or 'secret'" })
|
||||
})
|
||||
}),
|
||||
z.object({
|
||||
scope: z.literal(ZabbixSyncScope.Global),
|
||||
macroType: z.number().min(0, "Macro type required").max(1, "Macro type required")
|
||||
macroType: z.nativeEnum(ZabbixMacroType, {
|
||||
errorMap: () => ({ message: "Macro type must be either 'text' or 'secret'" })
|
||||
})
|
||||
})
|
||||
])
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user