Library
Module
Module type
Parameter
Class
Class type
The first version of the protocol is described here. However, it is not exactly clear in the document which field are optional and which are not optional. So, until a solid testing has been done, the API will be subject to changes.
The module Types
contains all types, bith for requests and responses.
Other values of this module straightforwardly corresponds to a method of the protocol.
type team = {
id : team_id;
ownerId : user_id;
path : team_path;
name : string;
logo : string;
description : string;
visibility : string;
createdAt : int;
}
The type for teams
type user = {
id : user_id;
name : string;
email : string option;
userPath : string;
photo : string;
teams : team list;
}
The type for users
How the published document open, for instance "view"
. Will change shortly to a variant type.
Used to specify comment permission.
Fewer information on a user, used on some fields such as note
and note_summary
.
type note_summary = {
id : note_id;
title : string;
createdAt : int;
publishType : publish_type;
publishedAt : int option;
permalink : string option;
shortId : string;
lastChangedAt : int;
lastChangeUser : change_user option;
userPath : user_path;
teamPath : team_path option;
readPermission : rw_permission;
writePermission : rw_permission;
}
Information on a note, without including the content. Used when querying the list of notes.
type note = {
id : note_id;
title : string;
createdAt : int;
publishType : publish_type;
publishedAt : int option;
permalink : string option;
shortId : string;
content : string;
lastChangedAt : int;
lastChangeUser : change_user option;
userPath : user_path;
teamPath : team_path option;
readPermission : rw_permission;
writePermission : rw_permission;
}
All information on a note, including its content.
type new_note = {
title : string;
content : string;
readPermission : rw_permission;
writePermission : rw_permission;
commentPermission : comment_permission;
}
Type used to create a new note, see create_note
.
Type used to update a note, see update_note
.