Skip to content

Latest commit

 

History

History
281 lines (169 loc) · 8.39 KB

competitionsuggestion.md

File metadata and controls

281 lines (169 loc) · 8.39 KB

@daostack/clientGlobalsCompetitionSuggestion

Class: CompetitionSuggestion

Hierarchy

  • CompetitionSuggestion

Index

Constructors

Properties

Methods

Object literals

Constructors

constructor

+ new CompetitionSuggestion(idOrOpts: string | object | ICompetitionSuggestionState, context: Arc): CompetitionSuggestion

Defined in schemes/competition.ts:616

Parameters:

Name Type
idOrOpts string | object | ICompetitionSuggestionState
context Arc

Returns: CompetitionSuggestion

Properties

context

context: Arc

Defined in schemes/competition.ts:620


id

id: string

Defined in schemes/competition.ts:614


Optional staticState

staticState? : ICompetitionSuggestionState

Defined in schemes/competition.ts:616


Optional suggestionId

suggestionId? : undefined | number

Defined in schemes/competition.ts:615

Methods

fetchStaticState

fetchStaticState(): Promise‹ICompetitionSuggestionState

Defined in schemes/competition.ts:643

Returns: Promise‹ICompetitionSuggestionState


getPosition

getPosition(): Promise‹null | number›

Defined in schemes/competition.ts:681

Returns: Promise‹null | number›


isWinner

isWinner(): Promise‹boolean›

Defined in schemes/competition.ts:687

Returns: Promise‹boolean›


redeem

redeem(beneficiary: Address): Operation‹boolean›

Defined in schemes/competition.ts:693

Parameters:

Name Type Default
beneficiary Address NULL_ADDRESS

Returns: Operation‹boolean›


setStaticState

setStaticState(opts: ICompetitionSuggestionState): void

Defined in schemes/competition.ts:639

Parameters:

Name Type
opts ICompetitionSuggestionState

Returns: void


state

state(apolloQueryOptions: IApolloQueryOptions): Observable‹ICompetitionSuggestionState

Defined in schemes/competition.ts:647

Parameters:

Name Type Default
apolloQueryOptions IApolloQueryOptions {}

Returns: Observable‹ICompetitionSuggestionState


vote

vote(): OperationCompetitionVote

Defined in schemes/competition.ts:661

Returns: OperationCompetitionVote


votes

votes(options: ICompetitionVoteQueryOptions, apolloQueryOptions: IApolloQueryOptions): Observable‹CompetitionVote[]›

Defined in schemes/competition.ts:672

Parameters:

Name Type Default
options ICompetitionVoteQueryOptions {}
apolloQueryOptions IApolloQueryOptions {}

Returns: Observable‹CompetitionVote[]›


Static calculateId

calculateId(opts: object): string

Defined in schemes/competition.ts:547

Parameters:

opts: object

Name Type
scheme Address
suggestionId number

Returns: string


Static Private mapItemToObject

mapItemToObject(item: any, context: Arc): ICompetitionSuggestionState | null

Defined in schemes/competition.ts:581

Parameters:

Name Type
item any
context Arc

Returns: ICompetitionSuggestionState | null


Static search

search(context: Arc, options: ICompetitionSuggestionQueryOptions, apolloQueryOptions: IApolloQueryOptions): Observable‹CompetitionSuggestion[]›

Defined in schemes/competition.ts:555

Parameters:

Name Type Default
context Arc -
options ICompetitionSuggestionQueryOptions {}
apolloQueryOptions IApolloQueryOptions {}

Returns: Observable‹CompetitionSuggestion[]›

Object literals

Static fragments

fragments: object

Defined in schemes/competition.ts:522

CompetitionSuggestionFields

CompetitionSuggestionFields: any = gqlfragment CompetitionSuggestionFields on CompetitionSuggestion { id suggestionId proposal { id } descriptionHash title description url tags { id } # fulltext: [string] suggester # votes: [CompetitionVote!] @derivedFrom(field: "suggestion") totalVotes createdAt redeemedAt rewardPercentage positionInWinnerList }

Defined in schemes/competition.ts:523