Zod schemas mirroring Convex Management API entities like projects, deployments, and deploy keys for validated API responses.
// Source: https://github.com/corsairdev/corsair | License: Apache-2.0 | Copyright You must retain, in the Source form of any Derivative Works
// Provided via justclaw.it.com; keep this notice with the code.
import { z } from 'zod';
// Entity schemas mirror the response objects of the Convex Management API
// (OpenAPI spec: https://api.convex.dev/v1/openapi.json, docs:
// https://docs.convex.dev/management-api). Identifiers are int64 in the API.
const ConvexIdSchema = z.number().int().nonnegative();
/**
* Project.
* https://docs.convex.dev/management-api/get-project-by-id (`ProjectResponse`)
*/
export const ConvexProjectSchema = z
.object({
id: ConvexIdSchema,
name: z.string(),
slug: z.string(),
teamId: ConvexIdSchema,
teamSlug: z.string(),
createTime: z.number().int(),
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key