Skip to content

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

1.0 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 { TImmutableDBKeys } from "./models";

export const KmsKeysSchema = z.object({
  id: z.string().uuid(),
  description: z.string().nullable().optional(),
  isDisabled: z.boolean().default(false).nullable().optional(),
  isReserved: z.boolean().default(true).nullable().optional(),
  orgId: z.string().uuid(),
  name: z.string(),
  createdAt: z.date(),
  updatedAt: z.date(),
  projectId: z.string().nullable().optional(),
  keyUsage: z.string().default("encrypt-decrypt"),
  kmipMetadata: z.unknown().nullable().optional(),
  isExportable: z.boolean().default(true),
  hasDeleteProtection: z.boolean().default(false)
});

export type TKmsKeys = z.infer<typeof KmsKeysSchema>;
export type TKmsKeysInsert = Omit<z.input<typeof KmsKeysSchema>, TImmutableDBKeys>;
export type TKmsKeysUpdate = Partial<Omit<z.input<typeof KmsKeysSchema>, TImmutableDBKeys>>;