Skip to content

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

1.3 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 AppConnectionCredentialRotationsSchema = z.object({
  id: z.string().uuid(),
  connectionId: z.string().uuid(),
  strategy: z.string(),
  encryptedStrategyConfig: zodBuffer,
  rotationInterval: z.number(),
  rotateAtUtc: z.unknown(),
  rotationStatus: z.string(),
  lastRotationAttemptedAt: z.date().nullable().optional(),
  lastRotatedAt: z.date().nullable().optional(),
  encryptedLastRotationMessage: zodBuffer.nullable().optional(),
  lastRotationJobId: z.string().nullable().optional(),
  nextRotationAt: z.date().nullable().optional(),
  activeIndex: z.number().default(0),
  encryptedGeneratedCredentials: zodBuffer,
  createdAt: z.date(),
  updatedAt: z.date()
});

export type TAppConnectionCredentialRotations = z.infer<typeof AppConnectionCredentialRotationsSchema>;
export type TAppConnectionCredentialRotationsInsert = Omit<
  z.input<typeof AppConnectionCredentialRotationsSchema>,
  TImmutableDBKeys
>;
export type TAppConnectionCredentialRotationsUpdate = Partial<
  Omit<z.input<typeof AppConnectionCredentialRotationsSchema>, TImmutableDBKeys>
>;