munin/source/types.ts

74 lines
1.4 KiB
TypeScript
Raw Normal View History

2025-05-06 21:26:30 +02:00
/*
This file is part of »munin«.
Copyright 2025 'Fenris Wolf' <fenris@folksprak.org>
»munin« 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.
»munin« 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 »munin«. If not, see <http://www.gnu.org/licenses/>.
*/
2025-04-25 12:50:13 +02:00
namespace _munin
2025-04-25 00:48:05 +02:00
{
2025-04-25 12:50:13 +02:00
/**
*/
export type type_labels = {
head : string;
title : string;
time : string;
location : string;
};
2025-04-25 00:48:05 +02:00
2025-04-25 12:50:13 +02:00
2025-04-25 00:48:05 +02:00
/**
*/
export type type_event = {
title : string;
begin : lib_plankton.pit.type_datetime,
end : (null | lib_plankton.pit.type_datetime),
location : (null | string);
tags : (null | Array<string>);
2025-04-25 00:48:05 +02:00
};
2025-04-25 12:50:13 +02:00
2025-04-25 00:48:05 +02:00
/**
*/
export type type_source = {
2025-04-25 12:50:13 +02:00
fetch : (
(
)
=>
Promise<Array<type_event>>
);
2025-04-25 00:48:05 +02:00
};
2025-04-25 12:50:13 +02:00
2025-04-25 00:48:05 +02:00
/**
*/
export type type_target = {
reminders : Array<int>;
show : (() => string);
2025-04-25 12:50:13 +02:00
send : (
(
labels : type_labels,
event : type_event
)
=>
Promise<void>
);
2025-04-25 00:48:05 +02:00
};
}