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 type errors
x03220583a119f489b3
diff --git a/backend/src/ee/routes/v1/pam-account-routers/pam-account-router.ts b/backend/src/ee/routes/v1/pam-account-routers/pam-account-router.tsindex 8744ed82b3..5641d281c0 100644--- a/backend/src/ee/routes/v1/pam-account-routers/pam-account-router.ts+++ b/backend/src/ee/routes/v1/pam-account-routers/pam-account-router.ts@@ -177,7 +177,7 @@ export const registerPamAccountRouter = async (server: FastifyZodProvider) => {handler: async (req) => {const account = await server.services.pamAccount.triggerManualRotation(req.params.accountId, req.permission);- return { account };+ return { account: account as z.infer<typeof SanitizedAccountSchema> };}});diff --git a/backend/src/ee/services/pam-account/pam-account-fns.ts b/backend/src/ee/services/pam-account/pam-account-fns.tsindex 008035dd37..a0c65de548 100644--- a/backend/src/ee/services/pam-account/pam-account-fns.ts+++ b/backend/src/ee/services/pam-account/pam-account-fns.ts@@ -1,7 +1,7 @@import { TKmsServiceFactory } from "@app/services/kms/kms-service";import { KmsDataKey } from "@app/services/kms/kms-types";-import { TPamAccountCredentials } from "../pam-resource/pam-resource-types";+import { TPamAccountCredentials, TPamResourceInternalMetadata } from "../pam-resource/pam-resource-types";import { SSHAuthMethod } from "../pam-resource/ssh/ssh-resource-enums";export const encryptAccountCredentials = async ({@@ -77,19 +77,20 @@ const hasConfiguredCredentials = (credentials: TPamAccountCredentials): boolean};export const decryptAccount = async <- T extends { encryptedCredentials: Buffer; encryptedLastRotationMessage?: Buffer | null }+ T extends { encryptedCredentials: Buffer; encryptedLastRotationMessage?: Buffer | null; internalMetadata?: unknown }>(account: T,projectId: string,kmsService: Pick<TKmsServiceFactory, "createCipherPairWithDataKey">): Promise<- Omit<T, "encryptedCredentials" | "encryptedLastRotationMessage"> & {+ Omit<T, "encryptedCredentials" | "encryptedLastRotationMessage" | "internalMetadata"> & {credentials: TPamAccountCredentials;credentialsConfigured: boolean;lastRotationMessage: string | null;+ internalMetadata?: TPamResourceInternalMetadata;}> => {- const { encryptedCredentials, encryptedLastRotationMessage, ...rest } = account;+ const { encryptedCredentials, encryptedLastRotationMessage, internalMetadata, ...rest } = account;const credentials = await decryptAccountCredentials({encryptedCredentials,