payment: note that Stripe has instituted an additional 1% fee for non-US cards
[hcoop/portal.git] / poll.sig
index 3a47db8..2392f2b 100644 (file)
--- a/poll.sig
+++ b/poll.sig
@@ -1,11 +1,12 @@
 signature POLL = sig
-    type poll = {id : int, usr : int, title : string, descr : string, starts : string, ends : string, votes : int}
+    type poll = {id : int, usr : int, title : string, descr : string, starts : string, ends : string, votes : int, official : bool, ready : bool}
 
     val lookupPoll : int -> poll
     val listPolls : unit -> poll list
+    val listCurrentPolls : unit -> poll list
     val listPollsLimit : int -> poll list
 
-    val addPoll : int * string * string * string * string * int -> int
+    val addPoll : int * string * string * string * string * int * bool * bool -> int
     val modPoll : poll -> unit
     val deletePoll : int -> unit
 
@@ -21,10 +22,27 @@ signature POLL = sig
 
     val dateLe : string * string -> bool
     val dateGeNow : string -> bool
+    val dateLeNow : string -> bool
     val dateLtNow : string -> bool
 
     val canModify : poll -> bool
     val requireCanModify : poll -> unit
 
     val nextSeq : int -> real
-end
\ No newline at end of file
+                        
+    val takingVotes : poll -> bool
+    val listChoicesWithVotes : int -> (bool * int * choice) list
+    val listChoicesWithMyVotes : int -> (bool * choice) list
+
+    val noDupes : ''a list -> bool
+    val listVoters : int -> Init.user list
+    (* This operates on choice IDs. *)
+
+    (* These operate on poll IDs. *)
+    val countVoters : int -> int
+    val listPollVoters : int -> Init.user list
+
+    val votingMembershipRequirement : int
+
+    val membershipLength : int -> int
+end