Skip to content

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

1.4 KB
Raw Blame
// Code generated by automation script, DO NOT EDIT.
// Automated by pulling database and generating zod schema
// To update. Just run npm run generate:schema
// Written by akhilmhdh.

import { z } from "zod";

import { zodBuffer } from "@app/lib/zod";

import { TImmutableDBKeys } from "./models";

export const SecretRotationsV2Schema = z.object({
  id: z.string().uuid(),
  name: z.string(),
  description: z.string().nullable().optional(),
  type: z.string(),
  parameters: z.unknown(),
  secretsMapping: z.unknown(),
  encryptedGeneratedCredentials: zodBuffer,
  isAutoRotationEnabled: z.boolean().default(true),
  activeIndex: z.number().default(0),
  folderId: z.string().uuid(),
  connectionId: z.string().uuid(),
  createdAt: z.date(),
  updatedAt: z.date(),
  rotationInterval: z.number(),
  rotateAtUtc: z.unknown(),
  rotationStatus: z.string(),
  lastRotationAttemptedAt: z.date(),
  lastRotatedAt: z.date(),
  encryptedLastRotationMessage: zodBuffer.nullable().optional(),
  lastRotationJobId: z.string().nullable().optional(),
  nextRotationAt: z.date().nullable().optional(),
  isLastRotationManual: z.boolean().default(true)
});

export type TSecretRotationsV2 = z.infer<typeof SecretRotationsV2Schema>;
export type TSecretRotationsV2Insert = Omit<z.input<typeof SecretRotationsV2Schema>, TImmutableDBKeys>;
export type TSecretRotationsV2Update = Partial<Omit<z.input<typeof SecretRotationsV2Schema>, TImmutableDBKeys>>;