@diffusionstudio/api-contract
v0.1.0
Published
API contract for the Diffusion Studio backend: zod schemas and tRPC AppRouter types.
Downloads
156
Readme
@diffusionstudio/api-contract
The API contract for the Diffusion Studio backend: zod input schemas, shared
types, and the tRPC AppRouter type used to create a fully typed client.
import { createTRPCClient, httpBatchLink } from "@trpc/client";
import type { AppRouter } from "@diffusionstudio/api-contract";
const trpc = createTRPCClient<AppRouter>({
links: [httpBatchLink({ url: "https://api.diffusion.studio/api/trpc" })],
});The AppRouter type is generated from the backend router — this package
always reflects the deployed API surface. The runtime exports are limited to
zod schemas and constants; no server code is included.
