backend/source/api/functions.ts

74 lines
2.2 KiB
TypeScript
Raw Permalink Normal View History

2024-05-20 21:56:48 +02:00
/*
Espe | Ein schlichtes Werkzeug zur Mitglieder-Verwaltung | Backend
Copyright (C) 2024 Christian Fraß
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public
License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later
version.
This program 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 General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see
<https://www.gnu.org/licenses/>.
*/
2024-04-22 10:22:18 +02:00
namespace _espe.api
2024-04-22 10:02:34 +02:00
{
/**
*/
export function make(
2025-04-03 06:19:19 +00:00
) : lib_plankton.rest_http.type_rest
2024-04-22 10:02:34 +02:00
{
2025-04-03 06:19:19 +00:00
const rest_subject : lib_plankton.rest_http.type_rest = lib_plankton.rest_http.make(
2024-04-22 10:02:34 +02:00
{
2024-04-22 16:09:04 +02:00
"title": "espe",
2024-04-22 10:02:34 +02:00
"versioning_method": "header",
"versioning_header_name": "X-Api-Version",
"set_access_control_headers": true,
"authentication": {
"kind": "key_header",
2025-04-03 06:19:19 +00:00
"data": {"name": "X-Session-Key"}
2024-04-22 10:02:34 +02:00
},
}
);
2024-05-21 19:58:00 +02:00
// meta
{
2024-06-03 01:28:13 +02:00
_espe.api.register_meta_ping(rest_subject);
2024-05-21 19:58:00 +02:00
_espe.api.register_meta_spec(rest_subject);
}
2024-04-22 10:02:34 +02:00
// session
{
2024-04-22 10:22:18 +02:00
_espe.api.register_session_begin(rest_subject);
_espe.api.register_session_end(rest_subject);
2024-04-22 10:02:34 +02:00
}
// member
{
2024-04-29 22:40:52 +02:00
_espe.api.register_member_project(rest_subject);
_espe.api.register_member_summon(rest_subject);
_espe.api.register_member_info(rest_subject);
_espe.api.register_member_register(rest_subject);
2024-04-30 01:32:24 +02:00
_espe.api.register_member_list(rest_subject);
_espe.api.register_member_read(rest_subject);
_espe.api.register_member_modify(rest_subject);
2024-06-23 11:47:50 +02:00
_espe.api.register_member_delete(rest_subject);
// password_change
{
_espe.api.register_member_password_change_initialize(rest_subject);
_espe.api.register_member_password_change_execute(rest_subject);
}
2024-04-22 10:02:34 +02:00
}
2025-04-03 06:19:19 +00:00
// invite
{
_espe.api.register_invite_create(rest_subject);
_espe.api.register_invite_examine(rest_subject);
_espe.api.register_invite_accept(rest_subject);
}
2024-04-22 10:02:34 +02:00
return rest_subject;
}
}