Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

fix(pam): cast xmax result to satisfy TypeScript

bernie-g53ac562da9a2
diff --git a/backend/src/ee/services/pam-session/pam-session-event-batch-dal.ts b/backend/src/ee/services/pam-session/pam-session-event-batch-dal.ts
index 342bc9c8f7..bf54470cbd 100644
--- a/backend/src/ee/services/pam-session/pam-session-event-batch-dal.ts
+++ b/backend/src/ee/services/pam-session/pam-session-event-batch-dal.ts
@@ -28,7 +28,7 @@ export const pamSessionEventBatchDALFactory = (db: TDbClient) => {
.onConflict(["sessionId", "startOffset"])
.merge(["encryptedEventsBlob"]) // on re-upload of the same offset, overwrite the blob instead of erroring or skipping
.returning(db.raw("(xmax = 0) as inserted"));
- return { wasInserted: result[0]?.inserted === true };
+ return { wasInserted: (result[0] as unknown as { inserted: boolean })?.inserted === true };
};
return { ...orm, findBySessionIdPaginated, upsertBatch };