UNPKG

@stackend/api

Version:

JS bindings to api.stackend.com

56 lines 1.72 kB
import { VoteActions, VoteState } from './voteReducer'; import { Vote, VoteSummary } from './index'; import { VoteInfo } from './voteReducer'; import { Comment } from '../comments'; /** * Add votes to the redux store * @param context * @param voteSummary * @param votes * @param hasVoted * @param myReview */ export declare function receiveVotes(context: string, voteSummary: VoteSummary, votes: { [id: number]: Vote; }, hasVoted?: boolean, myReview?: Comment | null): VoteActions; /** * Update votes in the redux store * @param context * @param vote * @param voteSummary * @param hasVoted * @param myReview */ export declare function updateVotes(context: string, vote: Vote, voteSummary: VoteSummary, hasVoted?: boolean, myReview?: Comment | null): VoteActions; /** * Get vote info for an object * @param state * @param context * @param referenceId */ export declare function getVoteInfo(state: VoteState, context: string, referenceId: number): VoteInfo | null; /** * Get vote for an object * @param state * @param context * @param referenceId * @param referenceGroupId */ export declare function getVote(state: VoteState, context: string, referenceId: number, referenceGroupId: number): Vote | null; /** * Get vote summary for an object * @param state * @param context * @param referenceId */ export declare function getVoteSummary(state: VoteState, context: string, referenceId: number): VoteSummary | null; /** * Get votes for an object * @param state * @param context * @param referenceId */ export declare function getVotes(state: VoteState, context: string, referenceId: number): { [referenceGroupId: number]: Vote; } | null; //# sourceMappingURL=voteActions.d.ts.map