zcash-grant-system/frontend/types/proposal.ts

80 lines
1.5 KiB
TypeScript
Raw Normal View History

2018-10-04 21:27:02 -07:00
import { Wei } from 'utils/units';
import { PROPOSAL_CATEGORY } from 'api/constants';
import {
CreateMilestone,
ProposalMilestone,
Update,
User,
Comment,
} from 'types';
2018-10-04 21:27:02 -07:00
2018-11-16 08:16:52 -08:00
export interface TeamInvite {
id: number;
dateCreated: number;
address: string;
accepted: boolean | null;
}
2018-10-04 21:27:02 -07:00
export interface Contributor {
address: string;
contributionAmount: Wei;
refundVote: boolean;
refunded: boolean;
proportionalContribution: string;
milestoneNoVotes: boolean[];
}
2018-11-13 08:07:09 -08:00
export interface ProposalDraft {
proposalId: number;
dateCreated: number;
title: string;
brief: string;
category: PROPOSAL_CATEGORY;
content: string;
2018-11-13 08:07:09 -08:00
stage: string;
target: string;
payoutAddress: string;
deadlineDuration: number;
milestones: CreateMilestone[];
team: User[];
2018-11-16 08:16:52 -08:00
invites: TeamInvite[];
2018-11-13 08:07:09 -08:00
}
2018-10-04 21:27:02 -07:00
export interface Proposal {
proposalId: number;
proposalAddress: string;
proposalUrlId: string;
2018-10-04 21:27:02 -07:00
dateCreated: number;
title: string;
2018-11-16 11:17:09 -08:00
brief: string;
content: string;
2018-10-04 21:27:02 -07:00
stage: string;
category: PROPOSAL_CATEGORY;
milestones: ProposalMilestone[];
team: User[];
2018-10-04 21:27:02 -07:00
}
2018-11-16 11:17:09 -08:00
export interface TeamInviteWithProposal extends TeamInvite {
proposal: Proposal;
}
2018-10-04 21:27:02 -07:00
export interface ProposalComments {
proposalId: Proposal['proposalId'];
2018-10-04 21:27:02 -07:00
totalComments: number;
comments: Comment[];
}
export interface ProposalUpdates {
proposalId: Proposal['proposalId'];
2018-10-04 21:27:02 -07:00
updates: Update[];
}
export interface UserProposal {
proposalId: number;
2018-10-04 21:27:02 -07:00
title: string;
brief: string;
team: User[];
2018-10-04 21:27:02 -07:00
funded: Wei;
target: Wei;
}