Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.
TypeScript acmeagentsai-agentscertificate-managementdevsecopsenvironment-variableskubernetesopen-sourcepampkipostgresprivate-caprivileged-access-managementsecret-managementsecret-managersecretssecrets-managementsecuritysecurity-toolsvault
fix backend types
Matheus Nogueira04088fe909cd
diff --git a/backend/src/ee/routes/v1/honey-token-routers/honey-token-endpoints.ts b/backend/src/ee/routes/v1/honey-token-routers/honey-token-endpoints.tsindex 6fd80ed037..0d4755d31d 100644--- a/backend/src/ee/routes/v1/honey-token-routers/honey-token-endpoints.ts+++ b/backend/src/ee/routes/v1/honey-token-routers/honey-token-endpoints.ts@@ -37,6 +37,8 @@ export const registerHoneyTokenEndpoints = <TType extends HoneyTokenType>({connectionId: z.string().uuid(),config: configSchema});+ const routeTestConnectionResponseSchema: z.ZodTypeAny = testConnectionResponseSchema;+ const routeDecryptedConfigSchema: z.ZodTypeAny = decryptedConfigSchema;server.route({url: "/configs",@@ -76,14 +78,15 @@ export const registerHoneyTokenEndpoints = <TType extends HoneyTokenType>({onRequest: verifyAuth([AuthMode.JWT]),schema: {response: {- 200: testConnectionResponseSchema+ 200: routeTestConnectionResponseSchema}},handler: async (req) => {- return server.services.honeyTokenConfig.testConnection({+ const response = await server.services.honeyTokenConfig.testConnection({orgPermission: req.permission,type});+ return testConnectionResponseSchema.parse(response);}});@@ -102,7 +105,7 @@ export const registerHoneyTokenEndpoints = <TType extends HoneyTokenType>({connectionId: z.string().nullable(),createdAt: z.date().nullable(),updatedAt: z.date().nullable(),- decryptedConfig: decryptedConfigSchema.nullable()+ decryptedConfig: routeDecryptedConfigSchema.nullable()})})}@@ -113,7 +116,12 @@ export const registerHoneyTokenEndpoints = <TType extends HoneyTokenType>({type});- return { config };+ return {+ config: {+ ...config,+ decryptedConfig: config.decryptedConfig ? decryptedConfigSchema.parse(config.decryptedConfig) : null+ }+ };}});diff --git a/backend/src/server/routes/v1/dashboard-router.ts b/backend/src/server/routes/v1/dashboard-router.tsindex 386042f2fa..e2cfd75af4 100644--- a/backend/src/server/routes/v1/dashboard-router.ts+++ b/backend/src/server/routes/v1/dashboard-router.ts@@ -31,8 +31,8 @@ import {import { PostHogEventTypes } from "@app/services/telemetry/telemetry-types";const MAX_DEEP_SEARCH_LIMIT = 500; // arbitrary limit to prevent excessive results-const INCLUDE_HONEY_TOKENS_OVERVIEW_DESC = DASHBOARD.SECRET_OVERVIEW_LIST.includeHoneyTokens as string;-const INCLUDE_HONEY_TOKENS_DETAILS_DESC = DASHBOARD.SECRET_DETAILS_LIST.includeHoneyTokens as string;+const INCLUDE_HONEY_TOKENS_OVERVIEW_DESC = "Whether to include honey tokens in the overview response.";+const INCLUDE_HONEY_TOKENS_DETAILS_DESC = "Whether to include honey tokens in the details response.";const SanitizedHoneyTokenSchema = HoneyTokensSchema.pick({id: true,