## Aufgaben - [\#408](https://vikunja.ramsch.sx/tasks/408) ## Beschreibung - mit Sync-Funktionen umgesetzt; fühlt sich alles sooo viel besser an Reviewed-on: #2 Co-authored-by: Fenris Wolf <fenris@folksprak.org> Co-committed-by: Fenris Wolf <fenris@folksprak.org>
145 lines
1.7 KiB
TypeScript
145 lines
1.7 KiB
TypeScript
|
|
/**
|
|
*/
|
|
namespace _dali.type
|
|
{
|
|
|
|
/**
|
|
*/
|
|
export enum enum_access_level {
|
|
none,
|
|
view,
|
|
edit,
|
|
admin
|
|
}
|
|
|
|
|
|
/**
|
|
*/
|
|
export type user_id = int;
|
|
|
|
|
|
/**
|
|
*/
|
|
export type user_object = {
|
|
name : string;
|
|
email_address : (
|
|
null
|
|
|
|
|
string
|
|
);
|
|
};
|
|
|
|
|
|
/**
|
|
* @todo deprecate?
|
|
*/
|
|
export type local_resource_event_id = int;
|
|
|
|
|
|
/**
|
|
* info: das ist nicht deckungsgleich mit der Event-ID aus dem Backend; hiermit werden sowohl lokale als auch
|
|
* extern eingebundene Events kodiert
|
|
*
|
|
* @example "local:1234"
|
|
* @example "ics~2345"
|
|
*/
|
|
export type event_key = string;
|
|
|
|
|
|
/**
|
|
*/
|
|
export type event_object = {
|
|
name : string;
|
|
begin : lib_plankton.pit.type_datetime;
|
|
end : (
|
|
null
|
|
|
|
|
lib_plankton.pit.type_datetime
|
|
);
|
|
location : (
|
|
null
|
|
|
|
|
string
|
|
);
|
|
link : (
|
|
null
|
|
|
|
|
string
|
|
);
|
|
description : (
|
|
null
|
|
|
|
|
string
|
|
);
|
|
};
|
|
|
|
|
|
/**
|
|
*/
|
|
export type event_entry = {
|
|
id : (null | local_resource_event_id);
|
|
key : event_key;
|
|
object : event_object;
|
|
};
|
|
|
|
|
|
/**
|
|
*/
|
|
export type resource_id = int;
|
|
|
|
|
|
/**
|
|
*/
|
|
export type resource_object = (
|
|
{
|
|
kind : "local";
|
|
data : {
|
|
events : Array<
|
|
event_object
|
|
>;
|
|
};
|
|
}
|
|
|
|
|
{
|
|
kind : "caldav";
|
|
data : {
|
|
read_only : boolean;
|
|
url : string;
|
|
};
|
|
}
|
|
);
|
|
|
|
|
|
/**
|
|
*/
|
|
export type calendar_id = int;
|
|
|
|
|
|
/**
|
|
*/
|
|
export type calendar_object = {
|
|
name : string;
|
|
hue : float;
|
|
access : {
|
|
public : boolean;
|
|
default_level : enum_access_level;
|
|
attributed : lib_plankton.map.type_map<
|
|
user_id,
|
|
enum_access_level
|
|
>;
|
|
};
|
|
resource : resource_object;
|
|
};
|
|
|
|
|
|
/**
|
|
*/
|
|
export enum enum_view_mode
|
|
{
|
|
week,
|
|
list,
|
|
}
|
|
|
|
}
|