UNPKG

decent-sdk

Version:

SDK for the Decent API

79 lines (78 loc) 1.86 kB
import { Address, Hex } from '../../types/Common'; import { SupportedChainId } from '../../types/Chains'; import { NewComment, UpdateComment } from '../../types/Discussion'; import { NewProposal, UpdateProposal } from '../../types/Proposal'; export type BaseParams = { apiUrl?: string; }; export type VerifySiweParams = { message: string; signature: Hex; apiUrl?: string; }; export type GetAllCommentsParams = { chainId: SupportedChainId; address: Address; slug: string; apiUrl?: string; }; export type CreateCommentParams = { chainId: SupportedChainId; address: Address; slug: string; comment: NewComment; apiUrl?: string; }; export type UpdateCommentParams = { chainId: SupportedChainId; address: Address; slug: string; commentId: string; comment: UpdateComment; apiUrl?: string; }; export type DeleteCommentParams = { chainId: SupportedChainId; address: Address; slug: string; commentId: string; apiUrl?: string; }; export type GetDaoParams = { chainId: SupportedChainId; address: Address; apiUrl?: string; }; export type GetAllDaosFilterParams = { chainId?: SupportedChainId; apiUrl?: string; }; export type GenericFetchParams = { route: string; options?: RequestInit; apiUrl?: string; }; export type GetAllProposalsParams = { chainId: SupportedChainId; address: Address; apiUrl?: string; }; export type ProposalParams = { chainId: SupportedChainId; address: Address; slug: string; apiUrl?: string; }; export type CreateProposalParams = { chainId: SupportedChainId; address: Address; proposal: NewProposal; apiUrl?: string; }; export type UpdateProposalParams = { chainId: SupportedChainId; address: Address; slug: string; proposal: UpdateProposal; apiUrl?: string; };