Files
suaveplan/packages/api-stack/api/api-plugin-file-upload/src/schemas/routes/single-shot.ts
2026-05-27 23:29:53 +01:00

17 lines
494 B
TypeScript

// schema: boundary-only
import z from "zod";
/**
* Successful single-shot upload response. Also reused as the
* `complete` response since both surfaces produce an `UploadRecord`.
*/
export const SingleShotResponseSchema = z.object({
uploadId: z.string().min(1),
size: z.number().int().nonnegative(),
sha256: z.string().length(64),
mimeType: z.string().min(1),
fileName: z.string().min(1),
});
export type SingleShotResponse = z.infer<typeof SingleShotResponseSchema>;