-
Notifications
You must be signed in to change notification settings - Fork 1
/
cordova_local_notifications.mli
84 lines (73 loc) · 2.26 KB
/
cordova_local_notifications.mli
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
type event =
| Click [@js "click"]
| Trigger [@js "trigger"]
| Schedule [@js "schedule"]
| Update [@js "update"]
| Clear [@js "clear"]
| ClearAll [@js "clearall"]
| Cancel [@js "cancel"]
| CancelAll [@js "cancelall"]
[@@js.enum]
module ScheduleOptions : sig
type t
val create :
?id:int ->
?title:string ->
?text:string ->
?every:string ->
?first_at:int ->
?badge:int ->
?sound:string ->
?data:string ->
(** For android **)
?icon:string ->
?smallicon:string ->
?every:string ->
?ongoing:bool ->
?led:string ->
unit ->
t
[@@js.builder]
val id : t -> int
val title : t -> string
val text : t -> string
val every : t -> string
val first_at : t -> int
val badge : t -> int
val sound : t -> string
val data : t -> string
val icon : t -> string
val smallicon : t -> string
val every : t -> string
val ongoing : t -> bool
val led : t -> string
val set_id : t -> int -> unit
val set_title : t -> string -> unit
val set_text : t -> string -> unit
val set_every : t -> string -> unit
val set_at : t -> int -> unit
val set_badge : t -> int -> unit
val set_sound : t -> string -> unit
val set_data : t -> string -> unit
val set_icon : t -> string -> unit
val set_smallicon : t -> string -> unit
val set_every : t -> string -> unit
val set_ongoing : t -> bool -> unit
val set_led : t -> string -> unit
end
val schedule : ScheduleOptions.t -> unit
[@@js.global "cordova.plugins.notification.local.schedule"]
val schedule_list : ScheduleOptions.t list -> unit
[@@js.global "cordova.plugins.notification.local.schedule"]
val on : event -> (ScheduleOptions.t -> unit) -> unit
[@@js.global "cordova.plugins.notification.local.on"]
val update : ScheduleOptions.t -> unit
[@@js.global "cordova.plugins.notification.local.update"]
val update_list : ScheduleOptions.t list -> unit
[@@js.global "cordova.plugins.notification.local.update"]
val clear : int -> (unit -> unit) -> unit
[@@js.global "cordova.plugins.notification.local.clear"]
val clear_list : int list -> (unit -> unit) -> unit
[@@js.global "cordova.plugins.notification.local.clear"]
val cancel : int -> (unit -> unit) -> unit
[@@js.global "cordova.plugins.notification.local.cancel"]