payment: note that Stripe has instituted an additional 1% fee for non-US cards
[hcoop/portal.git] / poll.sig
CommitLineData
e68ddb80 1signature POLL = sig
ed97a006 2 type poll = {id : int, usr : int, title : string, descr : string, starts : string, ends : string, votes : int, official : bool, ready : bool}
e68ddb80
AC
3
4 val lookupPoll : int -> poll
5 val listPolls : unit -> poll list
56dbfc30 6 val listCurrentPolls : unit -> poll list
e68ddb80
AC
7 val listPollsLimit : int -> poll list
8
ed97a006 9 val addPoll : int * string * string * string * string * int * bool * bool -> int
e68ddb80
AC
10 val modPoll : poll -> unit
11 val deletePoll : int -> unit
12
13 type choice = {id : int, pol : int, seq : real, descr : string}
14
15 val lookupChoice : int -> choice
16 val addChoice : int * real * string -> int
17 val modChoice : choice -> unit
18 val deleteChoice : int -> unit
19 val listChoices : int -> choice list
20
21 val vote : int * int * int list -> unit
22
23 val dateLe : string * string -> bool
24 val dateGeNow : string -> bool
56dbfc30 25 val dateLeNow : string -> bool
e68ddb80
AC
26 val dateLtNow : string -> bool
27
28 val canModify : poll -> bool
29 val requireCanModify : poll -> unit
30
31 val nextSeq : int -> real
56dbfc30
AC
32
33 val takingVotes : poll -> bool
34 val listChoicesWithVotes : int -> (bool * int * choice) list
35 val listChoicesWithMyVotes : int -> (bool * choice) list
36
37 val noDupes : ''a list -> bool
38 val listVoters : int -> Init.user list
1d2cae17
AC
39 (* This operates on choice IDs. *)
40
41 (* These operate on poll IDs. *)
42 val countVoters : int -> int
43 val listPollVoters : int -> Init.user list
a0a15865
AC
44
45 val votingMembershipRequirement : int
46
47 val membershipLength : int -> int
1d2cae17 48end