-
Notifications
You must be signed in to change notification settings - Fork 4
/
api.ml
61 lines (49 loc) · 2.66 KB
/
api.ml
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
open Slack_t
(** APIs signatures--necessary to split the actual implementation in api_remote.ml and mock
implementation in api_local.ml *)
module type S = sig
(* messaging *)
val send_chat_unfurl : ctx:Context.t -> req:chat_unfurl_req -> unit slack_response Lwt.t
val send_message : ctx:Context.t -> msg:post_message_req -> post_message_res slack_response Lwt.t
val send_message_webhook : ctx:Context.t -> url:string -> msg:post_message_req -> unit slack_response Lwt.t
val update_message : ctx:Context.t -> msg:update_message_req -> update_message_res slack_response Lwt.t
val upload_file : ctx:Context.t -> file:files_upload_req -> files_upload_res slack_response Lwt.t
(* conversations *)
val get_replies :
ctx:Context.t ->
conversation:conversations_replies_req ->
conversations_replies_res slack_response Lwt.t
val get_history :
ctx:Context.t ->
conversation:conversations_history_req ->
conversations_history_res slack_response Lwt.t
val get_conversations_info :
ctx:Context.t ->
conversation:conversations_info_req ->
conversations_info_res slack_response Lwt.t
val join_conversation : ctx:Context.t -> channel:conversations_join_req -> conversations_join_res slack_response Lwt.t
(* usergroups *)
val update_usergroup_users :
ctx:Context.t ->
usergroup:update_usergroups_users_req ->
update_usergroups_users_res slack_response Lwt.t
val list_usergroups : ctx:Context.t -> req:list_usergroups_req -> list_usergroups_res slack_response Lwt.t
val list_usergroup_users :
ctx:Context.t ->
usergroup:list_usergroup_users_req ->
list_usergroup_users_res slack_response Lwt.t
(* users *)
val get_user : ctx:Context.t -> user:user_info_req -> user_info_res slack_response Lwt.t
val list_users : ctx:Context.t -> req:list_users_req -> list_users_res slack_response Lwt.t
(* bookmarks *)
val add_bookmark : ctx:Context.t -> req:add_bookmark_req -> add_bookmark_res slack_response Lwt.t
val edit_bookmark : ctx:Context.t -> req:edit_bookmark_req -> edit_bookmark_res slack_response Lwt.t
val list_bookmarks : ctx:Context.t -> req:list_bookmarks_req -> list_bookmarks_res slack_response Lwt.t
val remove_bookmark : ctx:Context.t -> req:remove_bookmark_req -> remove_bookmark_res slack_response Lwt.t
(* views *)
val open_views : ctx:Context.t -> req:open_views_req -> open_views_res slack_response Lwt.t
val push_views : ctx:Context.t -> req:push_views_req -> push_views_res slack_response Lwt.t
val update_views : ctx:Context.t -> req:update_views_req -> update_views_res slack_response Lwt.t
(* misc *)
val send_auth_test : ctx:Context.t -> unit -> auth_test_res slack_response Lwt.t
end