Draft refactor core secrets fn into reusable factories

This commit is contained in:
Tuan Dang
2024-03-08 09:06:03 -08:00
parent 0b98feea50
commit 8ac7a29893
5 changed files with 177 additions and 143 deletions
+14 -1
View File
@@ -29,6 +29,8 @@ import { TSecretDALFactory } from "./secret-dal";
import { interpolateSecrets } from "./secret-fns";
import { TCreateSecretReminderDTO, THandleReminderDTO, TRemoveSecretReminderDTO } from "./secret-types";
// import { updateManySecretsRawFnFactory } from "@app/services/secret/secret-fns";
export type TSecretQueueFactory = ReturnType<typeof secretQueueFactory>;
type TSecretQueueFactoryDep = {
@@ -318,6 +320,17 @@ export const secretQueueFactory = ({
});
}
// const updateManySecretsRawFn = updateManySecretsRawFnFactory({
// botKey, // can move this out
// projectDAL,
// secretDAL,
// secretVersionDAL,
// secretBlindIndexDAL,
// secretTagDAL,
// secretVersionTagDAL,
// folderDAL
// });
await syncIntegrationSecrets({
projectDAL,
integrationDAL,
@@ -328,7 +341,7 @@ export const secretQueueFactory = ({
secretVersionTagDAL,
folderDAL,
botKey,
projectId,
projectId, // service
environment,
secretPath,
integration,