rallly/api-client/get-poll.ts
2022-05-13 08:44:35 +01:00

14 lines
427 B
TypeScript

import { Link, Option, Participant, Poll, User, Vote } from "@prisma/client";
export interface GetPollApiResponse extends Omit<Poll, "verificationCode"> {
options: Option[];
participants: Array<Participant & { votes: Vote[] }>;
user: User;
role: "admin" | "participant";
links: Array<Link>;
pollId: string;
}
export interface GetPollResponse extends Omit<GetPollApiResponse, "createdAt"> {
createdAt: string;
}