backend/source/types.ts
Fenris Wolf 175e57b1f3 [ini]
2024-09-12 00:03:29 +02:00

93 lines
929 B
TypeScript

/**
*/
namespace _zeitbild.type
{
/**
*/
type role = (
"editor"
|
"viewer"
);
/**
*/
type user_id = int;
/**
*/
type user_object = {
name : string;
};
/**
*/
export type event_id = int;
/**
*/
export type event_object = {
name : string;
begin : _zeitbild.helpers.type_datetime;
end : (
null
|
_zeitbild.helpers.type_datetime
);
location : (
null
|
string
);
description : (
null
|
string
);
};
/**
*/
export type calendar_id = int;
/**
*/
export type calendar_object = (
{
name : string;
private : boolean;
}
&
(
{
kind : "concrete";
data : {
users : Array<
{
id : user_id;
role : role;
}
>;
events : Array<event_object>;
};
}
|
{
kind : "caldav";
data : {
read_only : boolean;
source_url : string;
}
}
)
);
}