pollo/app/services/types.client.ts

65 lines
1.1 KiB
TypeScript
Raw Normal View History

2023-11-24 22:44:10 -07:00
// type BetterEnum<T> = T[keyof T];
2023-04-20 04:20:00 -06:00
export interface PresenceItem {
id: string;
userId: string;
userFullName: string;
userImageUrl: string;
roomId: string;
value: string;
isAdmin: boolean;
isVIP: boolean;
}
export type RoomsResponse =
| {
2024-04-09 11:09:51 -06:00
id: string;
createdAt: Date;
roomName: string;
}[]
2023-04-20 04:20:00 -06:00
| {
2024-04-09 11:09:51 -06:00
roomName: string | null;
id: string;
created_at: Date | null;
userId: string;
topicName: string | null;
visible: boolean;
scale: string;
}[]
2023-04-20 04:20:00 -06:00
| null
| undefined;
export type RoomResponse =
| {
2024-04-09 11:09:51 -06:00
id: string;
created_at: Date | null;
userId: string;
roomName: string | null;
topicName: string | null;
visible: boolean;
scale: string | null;
logs: {
2023-04-20 04:20:00 -06:00
id: string;
created_at: Date | null;
userId: string;
2024-04-09 11:09:51 -06:00
roomId: string;
2023-04-20 04:20:00 -06:00
roomName: string | null;
2024-04-09 11:09:51 -06:00
topicName: string | null;
2023-04-20 04:20:00 -06:00
scale: string | null;
2024-04-09 11:09:51 -06:00
votes: unknown;
}[];
}
2023-04-20 04:20:00 -06:00
| undefined
| null;
export type VoteResponse =
| {
2024-04-09 11:09:51 -06:00
id: string;
value: string;
created_at: Date | null;
userId: string;
roomId: string;
}[]
2023-04-20 04:20:00 -06:00
| null
| undefined;