buster/packages/server-shared/src/share/requests.ts

14 lines
367 B
TypeScript
Raw Normal View History

2025-07-18 00:43:08 +08:00
import { z } from 'zod';
import { ShareRoleSchema } from './share-interfaces.types';
export const SharePostRequestSchema = z.array(
z.object({
email: z.string().email(),
role: ShareRoleSchema,
avatar_url: z.string().nullable().optional(),
name: z.string().optional(),
})
);
export type SharePostRequest = z.infer<typeof SharePostRequestSchema>;