2019-03-25 21:23:04 +01:00
|
|
|
/**
|
|
|
|
* Basic type for a Poll on Mastodon
|
|
|
|
*/
|
|
|
|
export type Poll = {
|
2019-09-22 04:13:25 +02:00
|
|
|
id: string;
|
|
|
|
expires_at: string | null;
|
|
|
|
expired: boolean;
|
|
|
|
multiple: boolean;
|
|
|
|
votes_count: number;
|
|
|
|
options: [PollOption];
|
|
|
|
voted: boolean | null;
|
|
|
|
};
|
2019-03-25 21:23:04 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Basic type for a Poll option in a Poll
|
|
|
|
*/
|
|
|
|
export type PollOption = {
|
2019-09-22 04:13:25 +02:00
|
|
|
title: string;
|
|
|
|
votes_count: number | null;
|
|
|
|
};
|
2019-04-04 02:01:54 +02:00
|
|
|
|
|
|
|
export type PollWizard = {
|
2019-09-22 04:13:25 +02:00
|
|
|
expires_at: string;
|
|
|
|
multiple: boolean;
|
|
|
|
options: PollWizardOption[];
|
|
|
|
};
|
2019-04-04 02:01:54 +02:00
|
|
|
|
|
|
|
export type PollWizardOption = {
|
2019-09-22 04:13:25 +02:00
|
|
|
title: string;
|
|
|
|
};
|