2025-09-25 17:18:16 +02:00
|
|
|
/*
|
|
|
|
|
This file is part of »zeitbild«.
|
|
|
|
|
|
|
|
|
|
Copyright 2025 'kcf' <fenris@folksprak.org>
|
|
|
|
|
|
|
|
|
|
»zeitbild« is free software: you can redistribute it and/or modify
|
|
|
|
|
it under the terms of the GNU Lesser General Public License as published by
|
|
|
|
|
the Free Software Foundation, either version 3 of the License, or
|
|
|
|
|
(at your option) any later version.
|
|
|
|
|
|
|
|
|
|
»zeitbild« is distributed in the hope that it will be useful,
|
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
GNU Lesser General Public License for more details.
|
|
|
|
|
|
|
|
|
|
You should have received a copy of the GNU Lesser General Public License
|
|
|
|
|
along with »zeitbild«. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
*/
|
|
|
|
|
|
2024-09-12 00:03:29 +02:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
*/
|
2024-09-21 11:05:24 +02:00
|
|
|
namespace _zeitbild
|
2024-09-12 00:03:29 +02:00
|
|
|
{
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
*/
|
2024-09-21 10:56:00 +02:00
|
|
|
export enum enum_access_level {
|
|
|
|
|
none,
|
|
|
|
|
view,
|
|
|
|
|
edit,
|
|
|
|
|
admin
|
|
|
|
|
}
|
2024-09-12 00:03:29 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
*/
|
2024-09-21 11:05:24 +02:00
|
|
|
export type type_user_id = int;
|
2024-09-12 00:03:29 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
*/
|
2024-09-21 11:05:24 +02:00
|
|
|
export type type_user_object = {
|
2024-09-12 00:03:29 +02:00
|
|
|
name : string;
|
2024-09-13 17:49:32 +02:00
|
|
|
email_address : (
|
|
|
|
|
null
|
|
|
|
|
|
|
|
|
|
|
string
|
|
|
|
|
);
|
2025-09-25 17:05:15 +02:00
|
|
|
dav_token : (
|
|
|
|
|
null
|
|
|
|
|
|
|
|
|
|
|
string
|
|
|
|
|
);
|
2024-09-12 00:03:29 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
*/
|
2024-09-21 11:05:24 +02:00
|
|
|
export type type_event_object = {
|
2025-10-13 10:48:47 +02:00
|
|
|
/**
|
|
|
|
|
* @todo rename to "title"
|
|
|
|
|
*/
|
2024-09-12 00:03:29 +02:00
|
|
|
name : string;
|
2024-09-26 16:47:38 +02:00
|
|
|
begin : lib_plankton.pit.type_datetime;
|
2024-09-12 00:03:29 +02:00
|
|
|
end : (
|
|
|
|
|
null
|
|
|
|
|
|
|
2024-09-26 16:47:38 +02:00
|
|
|
lib_plankton.pit.type_datetime
|
2024-09-12 00:03:29 +02:00
|
|
|
);
|
|
|
|
|
location : (
|
|
|
|
|
null
|
|
|
|
|
|
|
|
|
|
|
string
|
|
|
|
|
);
|
2024-10-14 19:06:33 +02:00
|
|
|
link : (
|
|
|
|
|
null
|
|
|
|
|
|
|
|
|
|
|
string
|
|
|
|
|
);
|
2024-09-12 00:03:29 +02:00
|
|
|
description : (
|
|
|
|
|
null
|
|
|
|
|
|
|
|
|
|
|
string
|
|
|
|
|
);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
2024-09-26 10:33:33 +02:00
|
|
|
/**
|
|
|
|
|
*/
|
|
|
|
|
export type type_local_resource_event_id = int;
|
|
|
|
|
|
|
|
|
|
|
2024-09-12 00:03:29 +02:00
|
|
|
/**
|
|
|
|
|
*/
|
2024-09-21 11:05:24 +02:00
|
|
|
export type type_resource_id = int;
|
2024-09-12 00:03:29 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
*/
|
2024-09-21 11:05:24 +02:00
|
|
|
export type type_resource_object = (
|
2024-09-12 00:03:29 +02:00
|
|
|
{
|
2024-09-12 16:35:57 +02:00
|
|
|
kind : "local";
|
|
|
|
|
data : {
|
2024-09-26 10:33:33 +02:00
|
|
|
event_ids : Array<
|
|
|
|
|
type_local_resource_event_id
|
|
|
|
|
>;
|
2024-09-12 16:35:57 +02:00
|
|
|
};
|
2024-09-12 00:03:29 +02:00
|
|
|
}
|
2024-09-12 16:35:57 +02:00
|
|
|
|
|
|
|
|
|
{
|
2025-09-25 17:05:15 +02:00
|
|
|
kind : "ics_feed";
|
2024-09-12 16:35:57 +02:00
|
|
|
data : {
|
|
|
|
|
url : string;
|
2024-11-01 13:34:44 +01:00
|
|
|
from_fucked_up_wordpress : boolean;
|
2024-09-12 16:35:57 +02:00
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
*/
|
2024-09-21 11:05:24 +02:00
|
|
|
export type type_calendar_id = int;
|
2024-09-12 16:35:57 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
*/
|
2024-09-21 11:05:24 +02:00
|
|
|
export type type_calendar_object = {
|
2024-09-12 16:35:57 +02:00
|
|
|
name : string;
|
2025-10-13 13:19:33 +02:00
|
|
|
hue : float;
|
2024-09-21 10:56:00 +02:00
|
|
|
access : {
|
2024-10-10 23:00:29 +02:00
|
|
|
public : boolean;
|
2024-09-21 10:56:00 +02:00
|
|
|
default_level : enum_access_level;
|
|
|
|
|
attributed : lib_plankton.map.type_map<
|
2024-09-21 11:05:24 +02:00
|
|
|
type_user_id,
|
2024-09-21 10:56:00 +02:00
|
|
|
enum_access_level
|
|
|
|
|
>;
|
|
|
|
|
};
|
2024-09-21 11:05:24 +02:00
|
|
|
resource_id : type_resource_id;
|
2024-09-12 16:35:57 +02:00
|
|
|
};
|
2025-09-25 17:05:15 +02:00
|
|
|
|
|
|
|
|
|
2025-10-14 23:31:05 +02:00
|
|
|
/**
|
|
|
|
|
*/
|
|
|
|
|
export type type_event_hash = string;
|
|
|
|
|
|
|
|
|
|
|
2025-09-25 17:05:15 +02:00
|
|
|
/**
|
|
|
|
|
*/
|
|
|
|
|
export type type_event_extended = {
|
2025-10-14 23:31:05 +02:00
|
|
|
hash : type_event_hash;
|
2025-09-25 17:05:15 +02:00
|
|
|
calendar_id : type_calendar_id;
|
|
|
|
|
calendar_name : string;
|
2025-10-13 13:19:33 +02:00
|
|
|
hue : float;
|
2025-09-25 17:05:15 +02:00
|
|
|
access_level : enum_access_level;
|
|
|
|
|
event_id : (null | type_local_resource_event_id);
|
|
|
|
|
event_object : type_event_object;
|
|
|
|
|
};
|
2024-09-12 16:35:57 +02:00
|
|
|
|
2024-09-12 00:03:29 +02:00
|
|
|
}
|