115 lines
1.3 KiB
TypeScript
115 lines
1.3 KiB
TypeScript
|
|
/**
|
|
*/
|
|
namespace _zeitbild.frontend
|
|
{
|
|
|
|
/**
|
|
*/
|
|
type type_role = (
|
|
"editor"
|
|
|
|
|
"viewer"
|
|
);
|
|
|
|
|
|
/**
|
|
*/
|
|
type type_user_id = int;
|
|
|
|
|
|
/**
|
|
*/
|
|
type type_user_object = {
|
|
name : string;
|
|
};
|
|
|
|
|
|
/**
|
|
*/
|
|
export type type_event = {
|
|
name : string;
|
|
begin : _zeitbild.frontend.helpers.type_datetime;
|
|
end : (
|
|
null
|
|
|
|
|
_zeitbild.frontend.helpers.type_datetime
|
|
);
|
|
location : (
|
|
null
|
|
|
|
|
string
|
|
);
|
|
description : (
|
|
null
|
|
|
|
|
string
|
|
);
|
|
};
|
|
|
|
|
|
/**
|
|
*/
|
|
export type type_calendar_id = int;
|
|
|
|
|
|
/**
|
|
* @todo bei "collection" Kreise vermeiden
|
|
*/
|
|
export type type_calendar_object = (
|
|
{
|
|
kind : "concrete";
|
|
data : {
|
|
name : string;
|
|
private : boolean;
|
|
users : Array<
|
|
{
|
|
id : type_user_id;
|
|
role : type_role;
|
|
}
|
|
>;
|
|
events : Array<type_event>;
|
|
};
|
|
}
|
|
|
|
|
{
|
|
kind : "collection";
|
|
data : {
|
|
name : string;
|
|
private : boolean;
|
|
sources : Array<
|
|
type_calendar_id
|
|
>;
|
|
}
|
|
}
|
|
|
|
|
{
|
|
kind : "caldav";
|
|
data : {
|
|
name : string;
|
|
private : boolean;
|
|
read_only : boolean;
|
|
source_url : string;
|
|
}
|
|
}
|
|
);
|
|
|
|
|
|
/**
|
|
*/
|
|
export type type_datamodel = {
|
|
users : Array<
|
|
{
|
|
id : type_user_id;
|
|
object : type_user_object;
|
|
}
|
|
>;
|
|
calendars : Array<
|
|
{
|
|
id : type_calendar_id;
|
|
object : type_calendar_object;
|
|
}
|
|
>;
|
|
};
|
|
|
|
}
|