Skip to content

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

1.1 KB
Raw Blame
import { FastifyInstance, RawReplyDefaultExpression, RawRequestDefaultExpression, RawServerDefault } from "fastify";
import type { Cluster, Redis } from "ioredis";
import type { Knex } from "knex";

import { THsmServiceFactory } from "@app/ee/services/hsm/hsm-service";
import { CustomLogger } from "@app/lib/logger/logger";
import { ZodTypeProvider } from "@app/server/plugins/fastify-zod";
import { TKmsRootConfigDALFactory } from "@app/services/kms/kms-root-config-dal";
import { TSuperAdminDALFactory } from "@app/services/super-admin/super-admin-dal";

declare global {
  type FastifyZodProvider = FastifyInstance<
    RawServerDefault,
    RawRequestDefaultExpression<RawServerDefault>,
    RawReplyDefaultExpression<RawServerDefault>,
    Readonly<CustomLogger>,
    ZodTypeProvider
  >;

  // used only for testing
  const testServer: FastifyZodProvider;
  const testDb: Knex;
  const testRedis: Redis | Cluster;
  const testSuperAdminDAL: TSuperAdminDALFactory;
  const testKmsRootConfigDAL: TKmsRootConfigDALFactory;
  const testHsmService: THsmServiceFactory;
  const jwtAuthToken: string;
}