frontend-dali/source/logic/types.ts

110 lines
1.2 KiB
TypeScript
Raw Normal View History

2024-09-12 00:02:12 +02:00
/**
*/
namespace _zeitbild.frontend_web.type
2024-09-12 00:02:12 +02:00
{
/**
*/
2024-09-26 10:52:31 +02:00
export enum enum_access_level {
none,
view,
edit,
admin
}
2024-09-12 00:02:12 +02:00
/**
*/
export type user_id = int;
2024-09-12 00:02:12 +02:00
/**
*/
export type user_object = {
2024-09-12 00:02:12 +02:00
name : string;
email_address : (
null
|
string
);
2024-09-12 00:02:12 +02:00
};
/**
*/
export type event_object = {
2024-09-12 00:02:12 +02:00
name : string;
2024-09-26 16:47:01 +02:00
begin : lib_plankton.pit.type_datetime;
2024-09-12 00:02:12 +02:00
end : (
null
|
2024-09-26 16:47:01 +02:00
lib_plankton.pit.type_datetime
2024-09-12 00:02:12 +02:00
);
location : (
null
|
string
);
description : (
null
|
string
);
};
/**
*/
export type local_resource_event_id = int;
2024-09-12 00:02:12 +02:00
/**
*/
export type resource_id = int;
2024-09-12 00:02:12 +02:00
/**
*/
export type resource_object = (
2024-09-12 00:02:12 +02:00
{
kind : "local";
2024-09-12 00:02:12 +02:00
data : {
events : Array<
event_object
2024-09-12 00:02:12 +02:00
>;
};
}
|
{
kind : "caldav";
data : {
read_only : boolean;
url : string;
};
2024-09-12 00:02:12 +02:00
}
);
/**
*/
export type calendar_id = int;
/**
*/
export type calendar_object = {
name : string;
2024-09-26 10:52:31 +02:00
access : {
2024-10-10 23:00:51 +02:00
public : boolean;
2024-09-26 10:52:31 +02:00
default_level : enum_access_level;
attributed : lib_plankton.map.type_map<
user_id,
enum_access_level
>;
};
resource : resource_object;
2024-09-12 00:02:12 +02:00
};
}