frontend-dali/source/logic/types.ts

104 lines
1.1 KiB
TypeScript
Raw Normal View History

2024-09-12 00:02:12 +02:00
/**
*/
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;
/**
*/
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 : "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;
}
>;
};
}