2018-10-30 09:35:47 -07:00
|
|
|
// backend
|
|
|
|
export interface SocialMedia {
|
2019-01-16 21:01:29 -08:00
|
|
|
url: string;
|
|
|
|
service: string;
|
|
|
|
username: string;
|
2018-10-30 09:35:47 -07:00
|
|
|
}
|
|
|
|
export interface Milestone {
|
|
|
|
content: string;
|
|
|
|
dateCreated: string;
|
|
|
|
dateEstimated: string;
|
|
|
|
immediatePayout: boolean;
|
|
|
|
payoutPercent: string;
|
|
|
|
stage: string;
|
|
|
|
title: string;
|
|
|
|
}
|
2019-01-30 09:59:15 -08:00
|
|
|
// NOTE: sync with backend/grant/utils/enums.py ProposalStatus
|
2019-01-09 10:23:08 -08:00
|
|
|
export enum PROPOSAL_STATUS {
|
|
|
|
DRAFT = 'DRAFT',
|
|
|
|
PENDING = 'PENDING',
|
|
|
|
APPROVED = 'APPROVED',
|
|
|
|
REJECTED = 'REJECTED',
|
|
|
|
LIVE = 'LIVE',
|
|
|
|
DELETED = 'DELETED',
|
2019-01-31 14:56:16 -08:00
|
|
|
STAKING = 'STAKING',
|
2019-01-09 10:23:08 -08:00
|
|
|
}
|
2018-10-30 09:35:47 -07:00
|
|
|
export interface Proposal {
|
2018-11-09 10:48:55 -08:00
|
|
|
proposalId: number;
|
2019-01-09 10:23:08 -08:00
|
|
|
brief: string;
|
|
|
|
status: PROPOSAL_STATUS;
|
2018-11-09 10:48:55 -08:00
|
|
|
proposalAddress: string;
|
2018-10-30 09:35:47 -07:00
|
|
|
dateCreated: number;
|
2019-01-09 10:23:08 -08:00
|
|
|
dateApproved: number;
|
|
|
|
datePublished: number;
|
2018-10-30 09:35:47 -07:00
|
|
|
title: string;
|
2018-11-14 09:59:48 -08:00
|
|
|
content: string;
|
2018-10-30 09:35:47 -07:00
|
|
|
stage: string;
|
|
|
|
category: string;
|
|
|
|
milestones: Milestone[];
|
|
|
|
team: User[];
|
|
|
|
comments: Comment[];
|
|
|
|
contractStatus: string;
|
2019-01-09 10:23:08 -08:00
|
|
|
target: string;
|
2019-01-29 15:50:27 -08:00
|
|
|
contributed: string;
|
|
|
|
funded: string;
|
2019-01-09 10:23:08 -08:00
|
|
|
rejectReason: string;
|
2019-01-29 15:50:27 -08:00
|
|
|
contributionMatching: number;
|
2018-10-30 09:35:47 -07:00
|
|
|
}
|
|
|
|
export interface Comment {
|
|
|
|
commentId: string;
|
2019-01-16 21:01:29 -08:00
|
|
|
proposalId: Proposal['proposalId'];
|
|
|
|
proposal?: Proposal;
|
|
|
|
dateCreated: number;
|
2018-10-30 09:35:47 -07:00
|
|
|
content: string;
|
|
|
|
}
|
2019-01-16 21:01:29 -08:00
|
|
|
export interface Contribution {
|
|
|
|
id: number;
|
|
|
|
status: string;
|
|
|
|
txId: null | string;
|
|
|
|
amount: string;
|
|
|
|
dateCreated: number;
|
|
|
|
user: User;
|
|
|
|
proposal: Proposal;
|
|
|
|
}
|
2018-10-30 09:35:47 -07:00
|
|
|
export interface User {
|
|
|
|
accountAddress: string;
|
|
|
|
avatar: null | { imageUrl: string };
|
|
|
|
displayName: string;
|
|
|
|
emailAddress: string;
|
|
|
|
socialMedias: SocialMedia[];
|
|
|
|
title: string;
|
|
|
|
userid: number;
|
|
|
|
proposals: Proposal[];
|
|
|
|
comments: Comment[];
|
2019-01-16 21:01:29 -08:00
|
|
|
contributions: Contribution[];
|
2018-10-30 09:35:47 -07:00
|
|
|
}
|
2019-01-30 09:59:15 -08:00
|
|
|
// NOTE: sync with backend/grant/utils/enums.py RFPStatus
|
|
|
|
export enum RFP_STATUS {
|
|
|
|
DRAFT = 'DRAFT',
|
|
|
|
LIVE = 'LIVE',
|
|
|
|
CLOSED = 'CLOSED',
|
|
|
|
}
|
|
|
|
export interface RFP {
|
|
|
|
id: number;
|
|
|
|
dateCreated: number;
|
|
|
|
title: string;
|
|
|
|
brief: string;
|
|
|
|
content: string;
|
|
|
|
category: string;
|
|
|
|
status: string;
|
|
|
|
proposals: Proposal[];
|
|
|
|
}
|
|
|
|
export interface RFPArgs {
|
|
|
|
title: string;
|
|
|
|
brief: string;
|
|
|
|
content: string;
|
|
|
|
category: string;
|
|
|
|
status?: string;
|
|
|
|
}
|
2019-01-09 11:08:25 -08:00
|
|
|
|
|
|
|
export interface EmailExample {
|
|
|
|
info: {
|
|
|
|
subject: string;
|
|
|
|
title: string;
|
|
|
|
preview: string;
|
|
|
|
};
|
|
|
|
html: string;
|
|
|
|
text: string;
|
|
|
|
}
|
2019-01-30 09:59:15 -08:00
|
|
|
|
|
|
|
export enum PROPOSAL_CATEGORY {
|
|
|
|
DAPP = 'DAPP',
|
|
|
|
DEV_TOOL = 'DEV_TOOL',
|
|
|
|
CORE_DEV = 'CORE_DEV',
|
|
|
|
COMMUNITY = 'COMMUNITY',
|
|
|
|
DOCUMENTATION = 'DOCUMENTATION',
|
|
|
|
ACCESSIBILITY = 'ACCESSIBILITY',
|
|
|
|
}
|