diff --git a/docs/OpenSlides4-systemarchitecture.drawio b/docs/OpenSlides4-systemarchitecture.drawio deleted file mode 100644 index 8d639c6fd..000000000 --- a/docs/OpenSlides4-systemarchitecture.drawio +++ /dev/null @@ -1 +0,0 @@ -7V1bc5tIFv41rtp9kAtoro+W7Ngzdibe2HE2+zLVghbCwUJByJb867cRF9EXoCU1umTsVKVQAy045zv3060zMHhZXMdwOv4ceSg80xRvcQYuzzTNAgr+Px1Y5gOOlg34ceBlQ+p64CF4R/lgfp8/Dzw0Iy5MoihMgik56EaTCXITYgzGcfRGXjaKQvJbp9BHzMCDC0N29HvgJeN81DT09YkbFPjj4qtV08nOvMDi6vxVZmPoRW+VIXB1BgZxFCXZ0ctigMKUeAVhsvs+1ZwtnyxGk0TkhrvHi9e3OVgE/rV/D/58/xb0456dzfIKw3n+xvnDJsuCBHE0n3gonUQ5A/23cZCghyl007NvmOd4bJy8hPiTig9HQRgOojCKV/eC0WikuS4e9+BsvJojvWiWxNFPVLnMM4emYeIz+dOgOEGL2tdUS+Jh1KHoBSXxEl+S32DYRnZLjjjTzOn/tuYfsPKxcZV1xSDMMeOXc6+pig9ywvKJ/O1n336+HX7RF7fg8ttfz6qtm70CzE1URh7GXf4xipNx5EcTGF6tR/skH9bX3EXRNCfsM0qSZS5EcJ5EJG9mCYyTi1Qo8IAbwtkscIvhT0FYXIYWQfLf/FvS4x/p8bliF+cuF5WTl8vKh3sUB5hiKM7HaliH3zuax27+4vdLHzwsENKVm1vz6v7lKRqgkmL40XyU34u0AXh9uIbf/Eh5X3xZ/P30vz97wMouTMnXiI4YhTAJXkmx5nE6v/U+CvBDl6hSga4QsAI2hZbsUfPbqmLIzGRrzTNl1GFmWkGvfCMhNDbS9rhknoMSRg3UyrwKTIo7Biv0msIReiBD6Kdf775f3v69GEAY6P+J3Cv1IuzphxDxUnbPjYr0tkjuBL9u5ab044/qufVtq0/FfdtLt8aR7kaoypPunVhq2r87TwkTMYkmiLIP2R0ea0TwYMWEyIUGX7zUo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bFkc+VY58drbrhcqa+q8Ipsk7aVoxZ5IfQy/NClDDEqhqAnozEUsVDM9l6D1upY0jAwfXe9u3xLGRR12ZbfMEAVfBCu1fvHM8TRpLS3BbWXYiu2WijutqRahSwdr3OEg6kOFuhFW0pVyGsPK3HOPtOfYPrp1Qwl22h0lgv621a2reXuNOV4paPfTCyY2iUqn51w2icFElTQbETTtACaZVpWt9Ove5tda3FZ2YSO9O6/OBax4EuLut3NgspSoD7dshVzRnuk/kmsAmAOcAsbCOnYjyVww6Puwo12k4m+U6qet3znXyW+IOrf9V2yRk4lxRrX1YgbaV8/7K4RAXH8EtiOUrdNskUCO6cJ6diF4t3l17HB+JxqkodKl7G3fWWtmwFZB0EFrUhiBM3V98ETOlNAHdFtgxCrkbc81m0Ef9ObuTJJuzE8/FtW9jG8IhCvtlWEP22uM/NlRJFd5F4+8i5b97lX/vWZlZE/+9JHrPJaspNuFzuUdtOtqjVU00Gs3QhvzFH9e/jZVdvv6FMXD1fw== \ No newline at end of file diff --git a/docs/OpenSlides4-systemarchitecture.png b/docs/OpenSlides4-systemarchitecture.png deleted file mode 100644 index 97ff5297d..000000000 Binary files a/docs/OpenSlides4-systemarchitecture.png and /dev/null differ diff --git a/docs/client-server-streaming-communication.txt b/docs/client-server-streaming-communication.txt deleted file mode 100644 index 50f071385..000000000 --- a/docs/client-server-streaming-communication.txt +++ /dev/null @@ -1,53 +0,0 @@ -# Documentation for the streaming Client-Server-Protocol - -0) Notation -Special words with a definied meaning are surrounded by underscores. E.g. the -word _request_ would be the unique term for the http-message send form the -client to the server. - -1) What? -This document provides the specification for the unidirectional server to client -streaming. This is realized with HTTP1.1 streaming responses. The general -pattern starts with an _initial request_ form the client to a streaming endpoint. -The server can send _packets_ of data to the client whenever the server wants to. -The connection stays open, until one side closes it manually. - -2) Production usage -To keep the amount of tcp connections, connection establishments and the -associated overhead low, it is advised to ensure HTTP2 in production to make use -out of tcp multiplexing. All streaming (and other non-streaming) content is -multiplexed through a single tcp connection. - -3) Request meta information -The method, headers and payload of the initiating request are arbitrary and not -bounded to an restriction. The response content type header must be set to -`application/octet-stream` to avoid unwanted buffering in some browsers. -Otherwise all other headers are free to choose. If errors happen before the -response was send, the response status code can be a non-200 one. - -4) Message format: Packets -The server sends JSON objects (with an object as the outer most JSON-object) as -the _content_ of a package. So one package contains one JSON object. The content -is terminated with a line feed (0x0A). The terminated content is the _payload_, -which is send over the connection. It must be taken care of not sending -prettified JSON, to not include any unwanted line feeds and to not send -unnecessary bytes. To clearify, the terminating line feed must be the only line -feed in the payload. Note that linefeeds must be escaped in JSON-strings (see -RFC 7159). - -5) Errors -If an error happen in an established connection, the status code can not be -altered. To indicate errors, the following convention is used: To send an error -to the client, send a JSON-object with the single key `error` with an object as -value (e.g. {"error": {"detail": "Failed successfully"}}`). The server must -close the connection afterwards, because the client cannot react to the error. -For normal packets, it is forbidden to send content with an error key in the -outer most JSON-object. - -5) Outlook -There might be an additional reserved keys. The protocol may be extended to: - - a watchdog: the server sends a ping in regular time intervals. The client - take note of them and notices, if there was a missing ping. E.g. the timeout - for the client is twice the send interval time. If a missing ping was - detected, the connection is reestablished. - diff --git a/docs/datavalidator/export.json b/docs/datavalidator/export.json new file mode 100644 index 000000000..b23c2db6f --- /dev/null +++ b/docs/datavalidator/export.json @@ -0,0 +1 @@ +{"meeting":[{"id":1,"projection_ids":[],"list_of_speakers_countdown_id":1,"poll_countdown_id":2,"default_group_id":1,"admin_group_id":2,"reference_projector_id":1,"welcome_title":"Welcome to OpenSlides","welcome_text":"[Space for your welcome text.]","name":"OpenSlides","description":"Presentation and assembly system","location":"","start_time":0,"end_time":0,"jitsi_domain":null,"jitsi_room_name":null,"jitsi_room_password":null,"enable_chat":true,"url_name":null,"template_for_committee_id":null,"enable_anonymous":false,"custom_translations":[],"conference_show":false,"conference_auto_connect":false,"conference_los_restriction":false,"conference_stream_url":"","conference_stream_poster_url":"","conference_open_microphone":false,"conference_open_video":false,"conference_auto_connect_next_speakers":0,"projector_countdown_default_time":60,"projector_countdown_warning_time":0,"export_csv_encoding":"utf-8","export_csv_separator":",","export_pdf_pagenumber_alignment":"center","export_pdf_fontsize":10,"export_pdf_pagesize":"A4","agenda_show_subtitles":true,"agenda_enable_numbering":true,"agenda_number_prefix":"","agenda_numeral_system":"arabic","agenda_item_creation":"default_yes","agenda_new_items_default_visibility":"internal","agenda_show_internal_items_on_projector":false,"list_of_speakers_amount_last_on_projector":0,"list_of_speakers_amount_next_on_projector":-1,"list_of_speakers_couple_countdown":true,"list_of_speakers_show_amount_of_speakers_on_slide":true,"list_of_speakers_present_users_only":false,"list_of_speakers_show_first_contribution":false,"list_of_speakers_enable_point_of_order_speakers":false,"list_of_speakers_enable_pro_contra_speech":false,"list_of_speakers_can_set_contribution_self":false,"list_of_speakers_speaker_note_for_everyone":false,"list_of_speakers_initially_closed":false,"motions_default_workflow_id":1,"motions_default_amendment_workflow_id":1,"motions_default_statute_amendment_workflow_id":1,"motions_preamble":"The assembly may decide:","motions_default_line_numbering":"outside","motions_line_length":85,"motions_reason_required":false,"motions_enable_text_on_projector":true,"motions_enable_reason_on_projector":true,"motions_enable_sidebox_on_projector":false,"motions_enable_recommendation_on_projector":true,"motions_show_referring_motions":true,"motions_show_sequential_number":true,"motions_recommendations_by":"","motions_statute_recommendations_by":"","motions_recommendation_text_mode":"diff","motions_default_sorting":"identifier","motions_number_type":"per_category","motions_number_min_digits":1,"motions_number_with_blank":false,"motions_statutes_enabled":false,"motions_amendments_enabled":false,"motions_amendments_in_main_list":true,"motions_amendments_of_amendments":false,"motions_amendments_prefix":"-","motions_amendments_text_mode":"paragraph","motions_amendments_multiple_paragraphs":true,"motions_supporters_min_amount":0,"motions_export_title":"Motions","motions_export_preamble":"","motions_export_submitter_recommendation":false,"motions_export_follow_recommendation":false,"motion_poll_ballot_paper_selection":"CUSTOM_NUMBER","motion_poll_ballot_paper_number":8,"motion_poll_default_type":"analog","motion_poll_default_100_percent_base":"YNA","motion_poll_default_majority_method":"simple","motion_poll_default_group_ids":[],"users_sort_by":"first_name","users_enable_presence_view":false,"users_enable_vote_weight":false,"users_allow_self_set_present":false,"users_pdf_welcometitle":"Welcome to OpenSlides","users_pdf_welcometext":"[Place for your welcome and help text.]","users_pdf_url":"https://127.0.0.1","users_pdf_wlan_ssid":"","users_pdf_wlan_password":"","users_pdf_wlan_encryption":"","users_email_sender":"OpenSlides","users_email_replyto":"","users_email_subject":"OpenSlides access data","users_email_body":"Dear {name},\n\nthis is your personal OpenSlides login:\n\n {url}\n username: {username}\n password: {password}\n\nThis email was generated automatically.","assignments_export_title":"Elections","assignments_export_preamble":"","assignment_poll_ballot_paper_selection":"CUSTOM_NUMBER","assignment_poll_ballot_paper_number":8,"assignment_poll_add_candidates_to_list_of_speakers":true,"assignment_poll_sort_poll_result_by_votes":true,"assignment_poll_default_type":"analog","assignment_poll_default_method":"Y","assignment_poll_default_100_percent_base":"valid","assignment_poll_default_majority_method":"simple","assignment_poll_default_group_ids":[],"poll_ballot_paper_selection":"CUSTOM_NUMBER","poll_ballot_paper_number":8,"poll_sort_poll_result_by_votes":true,"poll_default_type":"analog","poll_default_method":"Y","poll_default_100_percent_base":"YNA","poll_default_majority_method":"simple","poll_default_group_ids":[],"poll_couple_countdown":true,"projector_ids":[1],"projector_message_ids":[],"projector_countdown_ids":[1,2],"tag_ids":[],"agenda_item_ids":[],"list_of_speakers_ids":[1],"speaker_ids":[],"topic_ids":[],"group_ids":[3,5,4,1,2],"mediafile_ids":[1],"motion_ids":[],"motion_comment_section_ids":[],"motion_category_ids":[],"motion_block_ids":[],"motion_workflow_ids":[2,1],"motion_statute_paragraph_ids":[],"motion_comment_ids":[],"motion_submitter_ids":[],"motion_change_recommendation_ids":[],"motion_state_ids":[4,6,3,7,2,13,14,12,11,8,1,15,5,9,10],"poll_ids":[],"option_ids":[],"vote_ids":[],"assignment_ids":[],"assignment_candidate_ids":[],"personal_note_ids":[],"chat_group_ids":[],"all_projection_ids":[],"logo_$_id":[],"font_$_id":[],"committee_id":null,"default_meeting_for_committee_id":null,"organization_tag_ids":[],"present_user_ids":[],"user_ids":[1],"default_projector_$_id":["amendment","agenda_all_items","assignment_poll","motion_block","current_list_of_speakers","projector_countdowns","mediafile","topics","list_of_speakers","projector_message","motion_poll","motion","user","assignment","poll"],"default_projector_$amendment_id":1,"default_projector_$agenda_all_items_id":1,"default_projector_$assignment_poll_id":1,"default_projector_$motion_block_id":1,"default_projector_$current_list_of_speakers_id":1,"default_projector_$projector_countdowns_id":1,"default_projector_$mediafile_id":1,"default_projector_$topics_id":1,"default_projector_$list_of_speakers_id":1,"default_projector_$projector_message_id":1,"default_projector_$motion_poll_id":1,"default_projector_$motion_id":1,"default_projector_$user_id":1,"default_projector_$assignment_id":1,"default_projector_$poll_id":1}],"list_of_speakers":[{"id":1,"closed":false,"content_object_id":"mediafile/1","speaker_ids":[],"projection_ids":[],"meeting_id":1}],"vote":[],"poll":[],"option":[],"mediafile":[{"id":1,"title":"main.cpp","is_directory":false,"mimetype":"text/x-c++src","pdf_information":{},"parent_id":null,"list_of_speakers_id":1,"filename":"main.cpp","filesize":1125,"blob":null,"create_timestamp":1624521902,"access_group_ids":[],"is_public":true,"inherited_access_group_ids":[],"child_ids":[],"attachment_ids":[],"projection_ids":[],"used_as_logo_$_in_meeting_id":[],"used_as_font_$_in_meeting_id":[],"meeting_id":1}],"motion":[],"motion_state":[{"id":4,"name":"not decided","recommendation_label":"No decision","allow_support":false,"allow_create_poll":false,"allow_submitter_edit":false,"show_state_extension_field":false,"show_recommendation_extension_field":false,"workflow_id":1,"css_class":"grey","restrictions":[],"set_number":true,"merge_amendment_into_final":"do_not_merge","next_state_ids":[],"previous_state_ids":[1],"motion_ids":[],"motion_recommendation_ids":[],"first_state_of_workflow_id":null,"meeting_id":1},{"id":6,"name":"submitted","recommendation_label":null,"allow_support":true,"allow_create_poll":false,"allow_submitter_edit":false,"show_state_extension_field":false,"show_recommendation_extension_field":false,"workflow_id":2,"css_class":"lightblue","restrictions":[],"set_number":false,"merge_amendment_into_final":"undefined","next_state_ids":[7,10,15],"previous_state_ids":[5],"motion_ids":[],"motion_recommendation_ids":[],"first_state_of_workflow_id":null,"meeting_id":1},{"id":3,"name":"rejected","recommendation_label":"Rejection","allow_support":false,"allow_create_poll":false,"allow_submitter_edit":false,"show_state_extension_field":false,"show_recommendation_extension_field":false,"workflow_id":1,"css_class":"red","restrictions":[],"set_number":true,"merge_amendment_into_final":"do_not_merge","next_state_ids":[],"previous_state_ids":[1],"motion_ids":[],"motion_recommendation_ids":[],"first_state_of_workflow_id":null,"meeting_id":1},{"id":7,"name":"permitted","recommendation_label":"Permission","allow_support":false,"allow_create_poll":true,"allow_submitter_edit":false,"show_state_extension_field":false,"show_recommendation_extension_field":false,"workflow_id":2,"css_class":"lightblue","restrictions":[],"set_number":true,"merge_amendment_into_final":"undefined","next_state_ids":[8,9,10,11,12,13,14],"previous_state_ids":[6],"motion_ids":[],"motion_recommendation_ids":[],"first_state_of_workflow_id":null,"meeting_id":1},{"id":2,"name":"accepted","recommendation_label":"Acceptance","allow_support":false,"allow_create_poll":false,"allow_submitter_edit":false,"show_state_extension_field":false,"show_recommendation_extension_field":false,"workflow_id":1,"css_class":"green","restrictions":[],"set_number":true,"merge_amendment_into_final":"do_merge","next_state_ids":[],"previous_state_ids":[1],"motion_ids":[],"motion_recommendation_ids":[],"first_state_of_workflow_id":null,"meeting_id":1},{"id":13,"name":"refered to committee","recommendation_label":"Referral to committee","allow_support":false,"allow_create_poll":false,"allow_submitter_edit":false,"show_state_extension_field":false,"show_recommendation_extension_field":false,"workflow_id":2,"css_class":"grey","restrictions":[],"set_number":true,"merge_amendment_into_final":"do_not_merge","next_state_ids":[],"previous_state_ids":[7],"motion_ids":[],"motion_recommendation_ids":[],"first_state_of_workflow_id":null,"meeting_id":1},{"id":14,"name":"needs review","recommendation_label":null,"allow_support":false,"allow_create_poll":false,"allow_submitter_edit":false,"show_state_extension_field":false,"show_recommendation_extension_field":false,"workflow_id":2,"css_class":"grey","restrictions":[],"set_number":true,"merge_amendment_into_final":"do_not_merge","next_state_ids":[],"previous_state_ids":[7],"motion_ids":[],"motion_recommendation_ids":[],"first_state_of_workflow_id":null,"meeting_id":1},{"id":12,"name":"not concerned","recommendation_label":"No concernment","allow_support":false,"allow_create_poll":false,"allow_submitter_edit":false,"show_state_extension_field":false,"show_recommendation_extension_field":false,"workflow_id":2,"css_class":"grey","restrictions":[],"set_number":true,"merge_amendment_into_final":"do_not_merge","next_state_ids":[],"previous_state_ids":[7],"motion_ids":[],"motion_recommendation_ids":[],"first_state_of_workflow_id":null,"meeting_id":1},{"id":11,"name":"adjourned","recommendation_label":"Adjournment","allow_support":false,"allow_create_poll":false,"allow_submitter_edit":false,"show_state_extension_field":false,"show_recommendation_extension_field":false,"workflow_id":2,"css_class":"grey","restrictions":[],"set_number":true,"merge_amendment_into_final":"do_not_merge","next_state_ids":[],"previous_state_ids":[7],"motion_ids":[],"motion_recommendation_ids":[],"first_state_of_workflow_id":null,"meeting_id":1},{"id":8,"name":"accepted","recommendation_label":"Acceptance","allow_support":false,"allow_create_poll":false,"allow_submitter_edit":false,"show_state_extension_field":false,"show_recommendation_extension_field":false,"workflow_id":2,"css_class":"green","restrictions":[],"set_number":true,"merge_amendment_into_final":"do_merge","next_state_ids":[],"previous_state_ids":[7],"motion_ids":[],"motion_recommendation_ids":[],"first_state_of_workflow_id":null,"meeting_id":1},{"id":1,"name":"submitted","recommendation_label":null,"allow_support":true,"allow_create_poll":true,"allow_submitter_edit":false,"show_state_extension_field":false,"show_recommendation_extension_field":false,"workflow_id":1,"css_class":"lightblue","restrictions":[],"set_number":true,"merge_amendment_into_final":"undefined","next_state_ids":[2,3,4],"previous_state_ids":[],"motion_ids":[],"motion_recommendation_ids":[],"first_state_of_workflow_id":1,"meeting_id":1},{"id":15,"name":"rejected (not authorized)","recommendation_label":"Rejection (not authorized)","allow_support":false,"allow_create_poll":false,"allow_submitter_edit":false,"show_state_extension_field":false,"show_recommendation_extension_field":false,"workflow_id":2,"css_class":"grey","restrictions":[],"set_number":true,"merge_amendment_into_final":"do_not_merge","next_state_ids":[],"previous_state_ids":[6],"motion_ids":[],"motion_recommendation_ids":[],"first_state_of_workflow_id":null,"meeting_id":1},{"id":5,"name":"in progress","recommendation_label":null,"allow_support":false,"allow_create_poll":false,"allow_submitter_edit":true,"show_state_extension_field":false,"show_recommendation_extension_field":false,"workflow_id":2,"css_class":"lightblue","restrictions":[],"set_number":false,"merge_amendment_into_final":"undefined","next_state_ids":[6,10],"previous_state_ids":[],"motion_ids":[],"motion_recommendation_ids":[],"first_state_of_workflow_id":2,"meeting_id":1},{"id":9,"name":"rejected","recommendation_label":"Rejection","allow_support":false,"allow_create_poll":false,"allow_submitter_edit":false,"show_state_extension_field":false,"show_recommendation_extension_field":false,"workflow_id":2,"css_class":"red","restrictions":[],"set_number":true,"merge_amendment_into_final":"do_not_merge","next_state_ids":[],"previous_state_ids":[7],"motion_ids":[],"motion_recommendation_ids":[],"first_state_of_workflow_id":null,"meeting_id":1},{"id":10,"name":"withdrawed","recommendation_label":null,"allow_support":false,"allow_create_poll":false,"allow_submitter_edit":false,"show_state_extension_field":false,"show_recommendation_extension_field":false,"workflow_id":2,"css_class":"grey","restrictions":[],"set_number":true,"merge_amendment_into_final":"do_not_merge","next_state_ids":[],"previous_state_ids":[6,7,5],"motion_ids":[],"motion_recommendation_ids":[],"first_state_of_workflow_id":null,"meeting_id":1}],"motion_workflow":[{"id":2,"name":"Complex Workflow","first_state_id":5,"state_ids":[5,6,7,8,9,10,11,12,13,14,15],"default_workflow_meeting_id":null,"default_amendment_workflow_meeting_id":null,"default_statute_amendment_workflow_meeting_id":null,"meeting_id":1},{"id":1,"name":"Simple Workflow","first_state_id":1,"state_ids":[1,2,3,4],"default_workflow_meeting_id":1,"default_amendment_workflow_meeting_id":1,"default_statute_amendment_workflow_meeting_id":1,"meeting_id":1}],"projector_countdown":[{"id":1,"title":"list of speakers countdown","description":"created at the migration from OS3 to OS4","default_time":60,"countdown_time":60,"running":false,"used_as_list_of_speaker_countdown_meeting_id":1,"used_as_poll_countdown_meeting_id":null,"projection_ids":[],"meeting_id":1},{"id":2,"title":"poll countdown","description":"created at the migration from OS3 to OS4","default_time":60,"countdown_time":60,"running":false,"used_as_list_of_speaker_countdown_meeting_id":null,"used_as_poll_countdown_meeting_id":1,"projection_ids":[],"meeting_id":1}],"speaker":[],"personal_note":[],"motion_submitter":[],"assignment_candidate":[],"user":[{"id":1,"username":"admin","title":"","first_name":"","last_name":"Administrator","is_active":true,"default_password":"admin","gender":"","email":"","is_physical_person":true,"password":"","default_number":"","default_structure_level":"","default_vote_weight":"1.000000","last_email_send":null,"is_demo_user":false,"organization_management_level":null,"is_present_in_meeting_ids":[],"committee_ids":[],"committee_$_management_level":[],"comment_$":[],"number_$":[],"structure_level_$":[],"about_me_$":[],"vote_weight_$":[],"group_$_ids":["1"],"group_$1_ids":[2],"can_change_own_password":true,"speaker_$_ids":[],"personal_note_$_ids":[],"supported_motion_$_ids":[],"submitted_motion_$_ids":[],"poll_voted_$_ids":[],"option_$_ids":[],"vote_$_ids":[],"vote_delegated_vote_$_ids":[],"assignment_candidate_$_ids":[],"projection_$_ids":[],"vote_delegated_$_to_id":[],"vote_delegations_$_from_ids":[],"meeting_ids":[1]}],"motion_comment_section":[],"chat_group":[],"group":[{"id":3,"name":"Delegates","permissions":["assignment.can_nominate_other","mediafile.can_see","motion.can_support","motion.can_create_amendments","list_of_speakers.can_be_speaker","meeting.can_see_frontpage","assignment.can_nominate_self","motion.can_create","meeting.can_see_autopilot","projector.can_see","agenda_item.can_see_internal","user.can_see"],"user_ids":[],"default_group_for_meeting_id":null,"admin_group_for_meeting_id":null,"mediafile_access_group_ids":[],"mediafile_inherited_access_group_ids":[],"read_comment_section_ids":[],"write_comment_section_ids":[],"read_chat_group_ids":[],"write_chat_group_ids":[],"poll_ids":[],"used_as_motion_poll_default_id":null,"used_as_assignment_poll_default_id":null,"used_as_poll_default_id":null,"meeting_id":1},{"id":5,"name":"Committees","permissions":["list_of_speakers.can_see","mediafile.can_see","motion.can_support","motion.can_create_amendments","meeting.can_see_frontpage","motion.can_create","assignment.can_see","projector.can_see","agenda_item.can_see_internal","user.can_see"],"user_ids":[],"default_group_for_meeting_id":null,"admin_group_for_meeting_id":null,"mediafile_access_group_ids":[],"mediafile_inherited_access_group_ids":[],"read_comment_section_ids":[],"write_comment_section_ids":[],"read_chat_group_ids":[],"write_chat_group_ids":[],"poll_ids":[],"used_as_motion_poll_default_id":null,"used_as_assignment_poll_default_id":null,"used_as_poll_default_id":null,"meeting_id":1},{"id":4,"name":"Staff","permissions":["list_of_speakers.can_manage","meeting.can_see_frontpage","assignment.can_nominate_self","meeting.can_see_history","agenda_item.can_manage","assignment.can_manage","user.can_manage","mediafile.can_manage","list_of_speakers.can_be_speaker","projector.can_manage","motion.can_manage"],"user_ids":[],"default_group_for_meeting_id":null,"admin_group_for_meeting_id":null,"mediafile_access_group_ids":[],"mediafile_inherited_access_group_ids":[],"read_comment_section_ids":[],"write_comment_section_ids":[],"read_chat_group_ids":[],"write_chat_group_ids":[],"poll_ids":[],"used_as_motion_poll_default_id":null,"used_as_assignment_poll_default_id":null,"used_as_poll_default_id":null,"meeting_id":1},{"id":1,"name":"Default","permissions":["list_of_speakers.can_see","mediafile.can_see","meeting.can_see_frontpage","assignment.can_see","projector.can_see","agenda_item.can_see_internal","user.can_see","motion.can_see"],"user_ids":[],"default_group_for_meeting_id":1,"admin_group_for_meeting_id":null,"mediafile_access_group_ids":[],"mediafile_inherited_access_group_ids":[],"read_comment_section_ids":[],"write_comment_section_ids":[],"read_chat_group_ids":[],"write_chat_group_ids":[],"poll_ids":[],"used_as_motion_poll_default_id":null,"used_as_assignment_poll_default_id":null,"used_as_poll_default_id":null,"meeting_id":1},{"id":2,"name":"Admin","permissions":[],"user_ids":[1],"default_group_for_meeting_id":null,"admin_group_for_meeting_id":1,"mediafile_access_group_ids":[],"mediafile_inherited_access_group_ids":[],"read_comment_section_ids":[],"write_comment_section_ids":[],"read_chat_group_ids":[],"write_chat_group_ids":[],"poll_ids":[],"used_as_motion_poll_default_id":null,"used_as_assignment_poll_default_id":null,"used_as_poll_default_id":null,"meeting_id":1}],"projector":[{"id":1,"name":"Default projector","scale":0,"scroll":0,"width":1200,"aspect_ratio_numerator":16,"aspect_ratio_denominator":9,"color":"#000000","background_color":"#ffffff","header_background_color":"#317796","header_font_color":"#f5f5f5","header_h1_color":"#317796","chyron_background_color":"#317796","chyron_font_color":"#ffffff","show_header_footer":true,"show_title":true,"show_logo":true,"show_clock":false,"current_projection_ids":[],"preview_projection_ids":[],"history_projection_ids":[],"used_as_reference_projector_meeting_id":1,"used_as_default_$_in_meeting_id":["amendment","agenda_all_items","assignment_poll","motion_block","current_list_of_speakers","projector_countdowns","mediafile","topics","list_of_speakers","projector_message","motion_poll","motion","user","assignment","poll"],"meeting_id":1,"used_as_default_$amendment_in_meeting_id":1,"used_as_default_$agenda_all_items_in_meeting_id":1,"used_as_default_$assignment_poll_in_meeting_id":1,"used_as_default_$motion_block_in_meeting_id":1,"used_as_default_$current_list_of_speakers_in_meeting_id":1,"used_as_default_$projector_countdowns_in_meeting_id":1,"used_as_default_$mediafile_in_meeting_id":1,"used_as_default_$topics_in_meeting_id":1,"used_as_default_$list_of_speakers_in_meeting_id":1,"used_as_default_$projector_message_in_meeting_id":1,"used_as_default_$motion_poll_in_meeting_id":1,"used_as_default_$motion_in_meeting_id":1,"used_as_default_$user_in_meeting_id":1,"used_as_default_$assignment_in_meeting_id":1,"used_as_default_$poll_in_meeting_id":1}],"projector_message":[],"tag":[],"agenda_item":[],"topic":[],"motion_category":[],"motion_block":[],"motion_statute_paragraph":[],"motion_comment":[],"motion_change_recommendation":[],"assignment":[],"projection":[]} diff --git a/docs/interfaces/action-service.txt b/docs/interfaces/action-service.txt deleted file mode 100644 index fbc76408b..000000000 --- a/docs/interfaces/action-service.txt +++ /dev/null @@ -1,80 +0,0 @@ -// Actions Service Interface - -/** - * Executes multiple actions in the context of the user given by the user_id. - * There are two modes of execution: - * atomic=true (default): - * All actions are validated in common, so if one action or one payload of - * one action fails, the request is aborted with an ActionException indicating - * the problematic action with both indices. - * => The whole request is handled atomically. - * atomic=false: - * Each action is validated by it's own. If there is an error, the error must - * be reported via an ActionError in the ActionsResponse. The actions result - * is not written into the Datastore. It might raise an ActionException if the - * single write request to the Datastore fails (e.g. because of locking there) - * - * For general, non specific action-related, errors an ActionException is used. - * - * @throws ActionException - */ -handle_request(payload: Action[], user_id: Id, atomic?: boolean): ActionsResponse - -interface Action { - action: string; - data: object[]; -} - -interace ActionsResponse { - success: true; - message: string; - - /** - * This is a potentially double-array with entries for each action - * and, if not null, an array for each data provided for each action. - * - * If an action does not produce a result, the inner array can be omitted and - * null can be used. If the inner array is given, each entry must be an object - * with the result (e.g. for a create action `{id: }`) or null. - * - * E.g. for valid arrays (two actions with two data entries each): - * - [null, null] - * - [null, [null, null]] - * - [null, [{id: 2}, null]] - * - [[{id: 2}, {id: 3}], [{id: 5}, {id: 8}]] - * - * - * To report errors, use the ActionError format! - **/ - results: (object[] | ActionError | null )[] -} - -/** - * If action_data_error_index is given, the error can be directly associated with the - * respective action data. If not, the error is of general fashion and/or not directly - * associated with a single action data. - * - * Note: ActionError can only be used if atomic=false. - */ -interface ActionError { - success: false; - message: string; - action_data_error_index?: number; -} - -/** - * JSON resonse with a status code of !=200. If a specific action raised the error, - * use the action_error_index and action_data_error_index to indicate the errored - * action and data, respectively. If there were general errors, both indices must be - * omitted or null. - * - * If the atomic flag was false in the request, it is not allowed to send - * action-specific errors with this exception. It must be responded with an - * ActionError through ActionsResponse (resulting in a status code of 200). - */ -Exception ActionException { - success: false; - message: string; - action_error_index?: number; - action_data_error_index?: number; -} diff --git a/docs/interfaces/auth-service.txt b/docs/interfaces/auth-service.txt deleted file mode 100644 index 5431ca42c..000000000 --- a/docs/interfaces/auth-service.txt +++ /dev/null @@ -1,131 +0,0 @@ -// Description of the authentication-service -// It is listening on port '9004' -// Routes with a prefix 'secure' are protected routes, that can only accessed with a valid ticket. -// That are routes, that call internally 'authenticate' - - -// The properties of this interface have to be passed as HTTP-headers in a request. -Interface Ticket { - authentication: string, - cookies: { - refreshId: string, - [name: string]: string - } -} - -// This describes, which information is received by requesting `secure/authenticate`. -Interface LoginInformation { - userId: number; - sessionId: string; -} - -/** -* Describes an http-response, which is sent back to any requesting service. -*/ -Interface Response { - set-authentication-header: string // If an old access-token is expired and refreshed, it is set as authentication-header. - // This determines if a request was successful. - success: boolean, - // This sends back a describing message. For example, the reason of a failured request. - message: string, - // Optional data, which is appended, if a request was successful. - data?: T -} - -/** -* The credentials for login/authentication are not valid. -*/ -Exception InvalidCredentials { - success: false, - message: string -} - -/** -* POST to /system/auth/login -* -* A user can login with its credentials for authentication. -* If they are correct, the service answers with a signed Token and sets a cookie, containing the sessionId of the client. -* -* If they aren't correct, the service throws an error. -* -* @throws InvalidCredentials -*/ -login (username: string, password: string): Response; - -/** -* POST to /internal/auth/authenticate -* -* This will be a library to act as part of the auth-service. The other services have not to -* request the auth-service for authentication. Instead, they use this library-function in their own -* and receive knowledge about authentication without request. -* -* Throws an exception, if the token is not valid. E.g. if the signature is not valid. -* -* @throws InvalidCredentials -*/ -authenticate (ticket: Ticket): Response; - -/** -* POST to /system/auth/who-am-i -* -* A request to get knowledge about themselves. This information is contained in the payload of -* a Token. So, this function handles the refreshing of a Token. -* Expects a jwt as string in a cookie (called 'refreshId'). -* -* Sends back a new Token (passed as http-header). -* -* Throws an exception, if the cookie is empty, the transmitted sessionId is wrong or the signature is wrong. -* -* @throws InvalidCredentials -*/ -who-am-i (refreshId: string): Response; - -/** -* POST to /system/auth/secure/clear-session-by-id -* -* Function to sign out one specific client from a user by its corresponding session-id. -*/ -secure/clear-session-by-id (sessionId: string, ticket: Ticket): Response publishes LogoutSessionEvent; - -/** -* POST to /system/auth/secure/clear-all-session-except-themselves -* -* Function to kill all current opened sessions from one user except the one, which is requesting. -*/ -secure/clear-all-sessions-except-themselves (sessionId: string, ticket: Ticket): Response publishes LogoutSessionEvent; - -/** -* POST to /system/auth/secure/logout -* -* The service deletes the session depending on the given Token. -* -* @throws InvalidCredentials -*/ -secure/logout (ticket: Ticket): Response publishes LogoutSessionEvent; - -/** -* GET to system/auth/secure/list-sessions -* -* Returns all currently active sessions. -* -* @returns an array containing currently active sessions. -*/ -secure/list-sessions (ticket: Ticket): Response<{sessions: string[]}>; - -/** -* POST to /internal/auth/hash -* -* Hashes a given value. A random salt (64bit) is generated and added to the hashed value. -* -* @returns the hashed value. The hashed value is structured as follows: [salt + hash]. -*/ -hash (toHash: string): Response<{hash: string}>; - -/** -* POST to /internal/auth/is-equals -* -* Compares a given value with an given hash. -* -* @returns a boolean, if the hashed value of the given value is equals to the passed hash. -*/ -is-equals (toHash: string, toCompare: string): Response<{isEquals: boolean}>; diff --git a/docs/interfaces/autoupdate-service.txt b/docs/interfaces/autoupdate-service.txt deleted file mode 100644 index 1fef519bc..000000000 --- a/docs/interfaces/autoupdate-service.txt +++ /dev/null @@ -1,145 +0,0 @@ -/** - * SyntaxError is returned, when the syntax of the request body is wrong. - * This error is returned on the beginning of a request with http-status-code - * 400. - */ -Exception SyntaxError(msg: string); - -/** - * JsonError is returned, when the body does not contain valid json. This error - * is returned on the beginning of a request with http-status-code 400. - */ -Exception JsonError(msg: string); - -/** - * ValueError is returned, when the value of a field does not have the expected - * format. E.g. there is an indicated relation to a key, but the data are no - * foreign ids/fqids. The exception may happen, if the stream is used at - * runtime, because this cannot be detected when the caller makes the request. - */ -Exception ValueError(msg: string); - -/** - * InternalError is an unexpected error on the server side. When it happens at - * the beginning of a request, an http-status-code 500 is used. But it can also - * happen after the first data have been streamed to the client. The error does - * not contain any useful information. More information can be found in the - * server log. This is the only error that generates a server log message. - */ - Expection InternalError(msg: string); - -/** - * This methods subscribes to a list of given request. The response is a stream - * (language dependent) updating all models according to the ModelRequest if new - * data is available. On subscription, initial data must be pushed to the caller - * as soon as possible. The stream can be closed by closing the stream (e.g. the - * underlying network connection). - * - * @throws SyntaxError - * @throws JsonError - * @throws ValueError - * @throws InternalError - */ -subscribe(request: ModelRequest[]): stream; - -/** - * This is the main interface for requesting models in a structured, nested way. - * The initial request targets some models as the root models of one collection - * with all the same fields. This build a tree of dependencies, because the - * value of some fields may be a GenericRelationFieldDescriptor again. - * - * For a description of `fields` and `collection`, see -* GenericRelationFieldDescriptor and RelationFieldDescriptor. - * - * `ids`: This is a list of ids for a collection, that should be provided. All - * models, that the user can see, must be included in the response. The model - * fields are handled according to `GenericRelationFieldDescriptor`. - */ -Interface ModelRequest extends Fields { - ids: ID[]; - collection: Collection; -} - -Interface Fields { - fields: { - [field: Field]: GenericRelationFieldDescriptor - | RelationFieldDescriptor - | StructuredFieldDescriptor - | null; - } -} - -/** - * For an overview, see `ModelRequest`. - * - * `fields` (inherited from `Fields`, see above): - * Regardless of the value of a field, the restricted values are given in the - * response (multiple for structured fields). If the restricted value is null, - * the field must be included here. - * - * If the value is not null, it is indicated, that there is a reference to - * follow. There are three types of values: - * - GenericRelationFieldDescriptor: The reference is a generic one. This means, - * that the actual value from the model is a fqid or an array of fqids. - * - RelationFieldDescriptor: A collection is given, so it can be expected, that - * the actual model value is an id or an array of ids. - * - StructuredFieldDescriptor: The field is a template field and should be - * handled in this way. - */ -Interface GenericRelationFieldDecriptor extends Fields { - type: 'generic-relation' | 'generic-relation-list'; -} - -/** - * For an overview, see `ModelRequest`. For `fields`, see - * GenericRelationFieldDescriptor. - * - * `collection`: - * This is the collection, the ids are associated to. The ids are provided with - * two different ways: - * - In a ModelRequest, the ids are given. - * - If this interface is used in a field indication a relation, the id(s) are - * given by the actual model data. - */ -Interface RelationFieldDescriptor extends Fields { - type: 'relation' | 'relation-list'; - collection: Collection; -} - -/** - * Structured Fields: A field with `$` as a placeholder can be structured. The - * `$` is a template placeholder. The `template field` holds a list of strings - * with options to insert into `$`. All these fields are the `structured - * fields`. Example: - * B_$_ids is the template field. Its value may be `["1", "test"]`, so the - * structured fields are B_1_ids and B_test_ids. - * - * This interface indicates, that there are structured fields related to the - * given template field, that should be resolved. If one would give `B_$_ids: - * null` without using this interface, the response would be just the template - * field `B_$_ids` and no structured fields. - * - * For just resolving values, leave `values` out (hence the optional parameter). - * - * For retrieveing a single structured field, use `RelationFieldDescriptor`. E.g. - * when trying to get the groups for a user from meeting 2, use `group_2_ids` - * directly and do not bother with structured fields. The terminology is a - * `specific structured field`. - * - * If the values of all structured fields are references, use the `values` - * parameter analog to the `fields` paramter as documented in - * `GenericRelationFieldDescriptor`. - */ -Interface StructuredFieldDecriptor { - type: 'template', - values?: GenericRelationFieldDescriptor | RelationFieldDescriptor; -} - - -/** - * This structure holds all data given by the called service as a map of - * fqfields to the fields values. - */ -Interface ModelData { - [fqfield: Fqfield]: Value; -} diff --git a/docs/interfaces/datastore-service.txt b/docs/interfaces/datastore-service.txt deleted file mode 100644 index 89f954ba7..000000000 --- a/docs/interfaces/datastore-service.txt +++ /dev/null @@ -1,332 +0,0 @@ -# Datastore Interface - -Enum EventType { - Create, - Update, - Delete, - Restore, -} - -Exception ModelDoesNotExist(model: Fqid); -Exception ModelExist(model: Fqid); -Exception ModelNotDeleted(model: Fqid); -Exception ModelLocked(key: (Fqid | Fqfield | CollectionField)[]); -Exception InvalidFormat(msg: string); -Exception InvalidRequest(msg: string); - -# Note: Error returns via HTTP 400: -Interface ErrorResponse { - error: InvalidFormatData | - InvalidRequestData | - ModelDoesNotExistData | - ModelExistData | - ModelMotDeletedData | - ModelLockedData; -} -Interface InvalidFormatData { - type: 1; - msg: string; -} -Interface InvalidRequestData { - type: 2; - msg: string; -} -Interface ModelDoesNotExistData { - type: 3; - fqid: string; -} -Interface ModelExistData { - type: 4; - fqid: string; -} -Interface ModelNotDeletedData { - type: 5; - fqid: string; -} -Interface ModelLockedData { - type: 6; - keys: string[]; -} - -## Writer -# Note: Different host and port than the reader! - -/** - * Writes Events into the datastore. - * If multiple WriteRequests are given, they are fully executed one-by-one, meaning - * if a earlier event invalidates the locked_field of a later WriteRequest, an - * exception is thrown. - * Url: POST to /internal/datastore/writer/write - * - * @throws ModelDoesNotExist - * @throws ModelExists - * @throws ModelLocked - * @throws InvalidFormat - * @throws ModelNotDeleted - */ -write(request: WriteRequest | WriteRequest[]): void publishes ModifiedFieldsEvent - -Interface WriteRequest { - events: (CreateEvent | RestoreEvent | UpdateEvent | DeleteEvent)[]; - information: { - : Object; - }; - user_id: number; - locked_fields: { - : Position; - : Position; - : Position | CollectionFieldLock | CollectionFieldLock[]; - } -} - -Interface CreateEvent { - type: 'create'; - fqid: Fqid; - fields: { - : Value; - } -} - -/** - * Note: For deleting keys, they must be set to `None`. These keys will be removed from - * the model. - * list_fields can be used to partially update list fields: the values in `add` will be - * appended to the given field, the values in `remove` will be removed from the field. - * Either fields or list_fields must be given or an error will be thrown. - * An exception will be thrown if: - * - a field in list_fields is not empty and not a list - * - a field in list_fields contains other entries than strings or ints - * Other edge cases: - * - an element should be added that is already in the list: this element is ignored, - * other potentially given elements are still added as normal - * - an element should be removed that is not in the list: this element is ignored, - * other potentially given elements are still removed as normal - * - the field does not yet exist on the model: - * - add: same function as if the value was given in `fields` - * - remove: nothing happens - */ -Interface UpdateEvent { - type: 'update'; - fqid: Fqid; - fields: { - : Value; - } - list_fields: { - add: { - : Value[]; - } - remove: { - : Value[]; - } - } -} - -Interface RestoreEvent { - type: 'restore'; - fqid: Fqid; -} - -Interface DeleteEvent { - type: 'delete'; - fqid: Fqid; -} - -// Collection fields can not only be locked to a specific position, but also filtered -// first, e.g. when selecting all models from a specific meeting. WARNING: the filter -// should always contain an equals check with the meeting_id, since this will be -// indexed. Other filters can lead to long query times. -// If no filter is given, it has the same meaning as just giving the position. -Interface CollectionFieldLock { - position: Position; - filter: Filter | null; -} - -// Note: The modified fqfields include: -// - all updated fqfields -// - all deleted fqfields -// - all fqfields of all deleted models -// - all fqfields of all created models -// - all fqfields of all restored models (logically the same as created) -Event ModifiedFieldsEvent on topic ModifiedFields { - modified: Fqfield[]; -} - -/** - * Reserves multiple sequential ids for the given collection und returns them. - * Url: POST to /internal/datastore/writer/reserve_ids - */ -reserveIds(collection: Collection, amount: number): Id[] - - -## Reader -# Note: Different host and port than the writer! - -/** Common notes: - * - parameter `position`: Optional, if given reads the data to this position. - * - parameter `mapped_fields`: List of fields that should only be present in the response. - * - parameter `get_deleted_models`: Optional, defines which models to return - * - DeletedModelsBehaviour.NO_DELETED: (Default) only non-deleted models are returned. - * get throws a ModelDoesNotExist error if the given - * model is deleted. - * - DeletedModelsBehaviour.ONLY_DELETED: only deleted models are returned. get throws - * a ModelNotDeleted if the given model is not deleted. - * - DeletedModelsBehaviour.ALL_MODELS: all models are returned - * - All operations adds the fields `meta_position` and `meta_deleted` to the models. - * - The InvalidFormat exception can always be thrown, if the requested formats are - * wrong, including something like empty collections, ... - */ - -Enum DeletedModelsBehaviour { - NO_DELETED = 1, - ONLY_DELETED = 2, - ALL_MODELS = 3 -} - -/** - * Returns a model by fqid. - * Url: POST to /internal/datastore/reader/get - * - * @throws ModelDoesNotExist - * @throws InvalidFormat - */ -get(fqid: Fqid, mapped_fields?: Field[], position?: Position, get_deleted_models?: DeletedModelsBehaviour): Partial; - -/** - * Returns multiple models. - * Url: POST to /internal/datastore/reader/get_many - * - * Can either be called with a list of Fqfields or with a list of specific request - * objects that map a collection to the needed ids and fields. If both the lower and - * the higher level mapped_fields are given, the higher level one is merged into all - * lower level ones. If Fqfields are given, the mapped_fields are ignored. - * If an id is not found, it is not included in the response instead of throwing a - * ModelDoesNotExist. - * - * @returns A mapping of collection to ids to models. Example: - * { - * "collection1": { - * "id1": { - * "field1": "foo", - * "field2": "bar", - * }, - * }, - * "collection2": { - * "id2": { - * "field3": 42, - * }, - * }, - * } - * - * @throws InvalidFormat - */ -get_many(requests: GetManyRequest[] | Fqfield[], mapped_fields?: Field[], position?: Position, get_deleted_models?: DeletedModelsBehaviour): Map>>; - -Interface GetManyRequest { - collection: Collection; - ids: Id[]; - mapped_fields?: Field[]; -} - -/** - * Returns all models of one collection. - * Url: POST to /internal/datastore/reader/get_all - * - * It is not possible to specify a position, so this method cannot be used if the user - * browses the history. It should be noted that it is highly disencouraged to use this - * method because it might return a huge amount of data. - * - * @returns see get_many - * @throws InvalidFormat - */ -get_all(collection: Collection, mapped_fields?: Field[], get_deleted_models?: DeletedModelsBehaviour): Map>; - -/** - * Returns all models. - * Url: POST to /internal/datastore/reader/get_everything - * - * This is a dev route only! - * - * @returns The example data format: A mapping of a collection to a list of models. - */ -get_everything(get_deleted_models?: DeletedModelsBehaviour): Map; - -interface FilterResponse { - position: Position; - data: Map>; -} - -/** - * Returns all models of one collection that satisfy the filter condition. - * Url: POST to /internal/datastore/reader/filter - * - * The global max position of the datastore is returned next the the filtered data. - * This method does not take a position and can not be used when browsing the history. - * - * @returns see get_many - * @throws InvalidFormat - */ -filter(collection: Collection, filter: Filter, mapped_fields?: Field[]): FilterResponse - -/** - * Url: POST to /internal/datastore/reader/exists - * - * See `filter`, returns true, if at least one model was found. The returned position is - * the highest position in the complete datastore. - * - * @throws InvalidFormat - */ -exists(collection: Collection, filter: Filter): {exists: boolean; position: Position;} - -/** - * Url: POST to /internal/datastore/reader/count - * - * See `filter`, returns the amount of found models. The returned position is - * the highest position in the complete datastore. - * - * @throws InvalidFormat - */ -count(collection: Collection, filter: Filter): {count: number; position: Position;} - -/** - * Url: POST to /internal/datastore/reader/min - * - * Executes a min aggregation on all models of one collection on - * the given field that satisfy the filter condition. - * The field is cast to int by default. If aggregation of another field type is needed, - * a valid type can be passed via the type parameter. - * - * @throws InvalidFormat - */ -min(collection: Collection, filter: Filter, field: Field, type?: string): {min: Value; position: Position;} - -/** - * Url: POST to /internal/datastore/reader/max - * Analogous to min. - * - * @throws InvalidFormat - */ -max(collection: Collection, filter: Filter, field: Field, type?: string): {max: Value; position: Position;} - -Type Filter = And | Or | Not | FilterOperator - -/** - * The filter predicate. M[field] states the value of the field of a model M. - * For all operations the predicate if true, if `M[field] value` is true. - */ -Interface FilterOperator { - field: Field; - value: Value | null; - operator: '=' | '!=' | '<' | '>' | '>=' | '<='; -} - -Interface Not { - not_filter: Filter; -} - -Interface And { - and_filter: Filter[]; -} - -Interface Or { - or_filter: Filter[]; -} diff --git a/docs/interfaces/how-to.txt b/docs/interfaces/how-to.txt deleted file mode 100644 index ff9532f6d..000000000 --- a/docs/interfaces/how-to.txt +++ /dev/null @@ -1,68 +0,0 @@ -## How to specify an interface for a service? - -There are many ways to describe, what a service should do. The main -characteristics (from an outside-view) are the provided functions. Each service -does have functions to execute with arguments and return types. Next to the -returnvalue, events can be published or errors be thrown. The way we want to -derscribe these interfaces is through a TypeScript-like interface definition. -The interface is the collection of all functions defined. - -Example: - /** - * The Exception, if a model wasn't found. The missed id is given. - */ - Exception ObjectNotFound(id: Id); - - /** - * Does something.. - * - * @throws ObjectNotFound - do_it(data: MyRequest): void publishes MyEvent; - - Interface MyRequest { - id: Id; - text: string; - some_other_value: number; - } - - Event MyEvent on topic MyEventTopic { - changed_text: string; - } - -There are some common types defined here: - Type Position=number; - Type Id=number; - Type Fqid=string; // `collection/id` - Type Fqfield=string; // `collection/id/field` - Type Collection=string; // `collection` - Type CollectionField=string; // `collection/field` - Type Model=object; - Type Field=string; - Type Value=any; - -The language is a bit modified: - -1) Exceptions - Exceptions should be declared by giving the name and parameters: - # Exception (: , ...); - A comment should state, why this exception can be thrown - -2) Events in the function declaration - Each function takes some arguments and have a return type. Next to the - return type, some events can be published. With the `publishes` token, one - can give a comma seperated list of events, that can be generated. - # my_function(): void publishes Event1, Event2 - - Events should be specified as interfaces, but named `Events`. Also there is - the `on topic` token, on which topic the message is broadcasted. - # Event MyEvent on topic MyEventTopic { ... } - -3) Functiondocumentation - Each function must have a description. Also it should tell, what exceptions - could be thrown. - -4) Placeholders - If you need generic names, use placeholders: `` - E.g. if the event topic is specific for one id, the topic used may be - definied as this example: - # Event MyEvent on topic MyEventForUser { ... } diff --git a/docs/interfaces/media-service.txt b/docs/interfaces/media-service.txt deleted file mode 100644 index 1ced8b67f..000000000 --- a/docs/interfaces/media-service.txt +++ /dev/null @@ -1,35 +0,0 @@ -/** - * Saves a mediafile (encoded as base64) into this service. - * - * Technical: - * POST to /internal/media/upload_mediafile/ with JSON payload. - * Returns 200 on success, 4xx on errors with a message in the payload. - */ -upload_mediafile(file: string, id: Id, mimetype: string): {message: string} | void - -/** - * Saves a resource (encoded as base64) into this service. - * - * Technical: - * POST to /internal/media/upload_resource/ with JSON payload. - * Returns 200 on success, 4xx on errors with a message in the payload. - */ -upload_resource(file: string, id: Id, mimetype: string): {message: string} | void - -/** - * Retrieves a mediafile given by it's id. - * - * Technical: - * GET to /system/media/get/ - * Returns 200 on success and 404, if the resource does not exist - */ -get(mediafile_id: Id): Blob - -/** - * Retrieves a resource given by it's id. - * - * Technical: - * GET to /system/media/get_resource/ - * Returns 200 on success and 404, if the resource does not exist - */ -get(resource_id: Id): Blob \ No newline at end of file diff --git a/docs/interfaces/permission-service.txt b/docs/interfaces/permission-service.txt deleted file mode 100644 index aba53abfc..000000000 --- a/docs/interfaces/permission-service.txt +++ /dev/null @@ -1,53 +0,0 @@ -# Permission Service Interface - - -/** - * Returns true, if the thing requested (identified by `name`) is allowed for each - * provided data in `dataList` by the user given by `user_id`. - * - * Convention: For each action and presenter, there will be an permission check. - * This is not enforced but a good guideline to see which permission check belongs - * to which usecase. - **/ -is_allowed(name: string, user_id: Id, dataList: object[]): bool - - -/** - * Filters the fqfields that can ve deen by the user. Only fqfields are returned, that are accessible. - **/ -restrict_fqfields(fqfields: Fqfield[], user_id: Id): Fqfield[] - - -/** - * Should be called for each update of the datastore with the changed data. It - * returns user ids, which should get a full update since too many/complicated - * permission changes accur. - * - * Possible reasons for additional updates: - * 1) A permission related relation to a user has changed: - * - Relation to a group - * - Relation to a meeting (via guest/temporary relation) - * - Relation to a committee (or an upgrade/downgrade as a manager) - * 2) Role of a user has changed - * 3) Permissions of a group changed -> Full update for all users in this group - * 4) Changes in specific (meeting-related) models: - * - Motion submitter: - * - Motion state: Update des Antrages - * - Motion block internal: Update des Blocks - * - Motion comment section read groups: Update aller Comments dieser Section - * - State restrictions: Update aller Anträge in dem State - * - Agendaitem visibility: Update des Agendaitems - * - Poll state: Wenn state==published volles update aller options/votes - * - Mediafile (has_)inherited_access_groups: Update der Mediafile - * - Mediafile used_as_*: Update der Mediafile - * - **/ -additional_update(updated: {[fqfield: Fqfield]: Value}): Id[] - -/** - * This technical interface must be implemented by the services - * users. - */ -Interface DataProvider { - get: (fqfields: Fqfield[]) => {[fqfield: Fqfield]: Value} -} diff --git a/docs/interfaces/presenter-service.txt b/docs/interfaces/presenter-service.txt deleted file mode 100644 index d273dc2d2..000000000 --- a/docs/interfaces/presenter-service.txt +++ /dev/null @@ -1,53 +0,0 @@ -# Presenter Service Interface - -Exception PresenterException(message: string); - -/** - * Executes some presenting function on the server. The term "presenting" means - * a non writing (or modifying) idempotent request. There may be some - * side-effect allowed (like tracking calls to one presenter), but the main - * purpose is to get data of the server, which is not autoupdate-, projector-, or - * icc-data. - * - * Some purposes may be: - * - aggregating of login data - * - managing of whoami, if additional data is needed, that the auth service - * doesn't provide - * - To get history points - * - To get history data - * - To get the installed version - * - To query statistics - * - To calculate recursive trees (e.g. origins of motions; not possible with - * the autoupdate service) - * - to synchronize the servertime for countdowns - * - * @throws PresenterException This exception might be thrown, if there was an - * server error (Http-500-equivalent). For user error (e.g. wrong data) use the - * PresenterError interface. - */ -handle_request(payload: Presenter[], user_id: Id): PresenterResult[] - -/** - * This interface specifies what presenter is used with the payload for the call. - */ -Interface Presenter { - presenter: string; - data: any; -} - -/** - * A presenter may return anything. This is presenter-specific. But if there was - * an error (user error, not a PresenterException), the response for this - * presenter should follow `PresenterError`. - * - * TODO: Maybe we do not want to response an error but always throw an exception - * instead. - */ -type PresenterResult = any | PresenterError; - -/** - * A common format for errors. - */ -Interface PresenterError { - error: object; -} diff --git a/docs/interfaces/restriction-service.txt b/docs/interfaces/restriction-service.txt deleted file mode 100644 index de0cf74ad..000000000 --- a/docs/interfaces/restriction-service.txt +++ /dev/null @@ -1,20 +0,0 @@ -# Restrictions Service Interface - -Exception RestrictionException(message: string); - - -/** - * Restricts data for given user - * - * @throws RestrictionException - */ -handle_request (payload: Restriction[]): RestrictionResult[] - -interface Restriction { - user_id: number; - fqfields: Fqfield[]; -} - -interface RestrictionResult { - : Value; -} diff --git a/docs/modellierung.drawio b/docs/modellierung.drawio deleted file mode 100644 index 67e377b7f..000000000 --- a/docs/modellierung.drawio +++ /dev/null @@ -1 +0,0 @@ -7V1bd5u4Fv41eTlrOQsQ18cmbTqdOTltJ505bV6yiK3YnMHIAWzH+fUHYmSDtIPBBkm0eYoRl8DWt7f2XWfocv70MfYXs2syweGZoU2eztD7M8PQTd3N/uQjm+2IY1vbgWkcTIqL9gM3wTMuBrVidBlMcFK5MCUkTINFdXBMogiP08qYH8dkXb3sgYTV/7rwp5gbuBn7IT/632CSzopR2zL3J37DwXRW/GsDIXt7Zu7Tq4tPSWb+hKxLQ+jDGbqMCUm3v+ZPlzjMqUcJs73v6pWzuzeLcZQ2ueE/v8dr9zF5l6yd1fjHjydr8TUc5Tfkj1n54bL45OJt0w2lQUyW0QTnT9HP0MV6FqT4ZuGP87PrbNazsVk6D4vTEz+Z7a7lX7F46xWOU/xUGipe+SMmc5zGm+yS4qznFOQrAKQ7BYDWpenwimtmpZlAFEJ+AYHp7tl7ImU/Cjq1oBnFNEgiLftsEqczMiWRH/6bkEVBi//hNN0UAPeXKamSDT8F6ff89nPDKg5/FE/Lf79/Kh9s6EGUfc72Lose/qAPzA/2t70c7e+bvMt5IzuMSIS3I1dBToWX869OW0KW8RjXkaZgUT+e4rTmuoKCeFLhPh4EMQ79NFhVmbHzCaUQKzHBnJvi/F1visOCah3OennS9aMmXVN+0m2v4awXrK+d65qpV7i/wE1jWBTP/kKC7KP2l5CHhyR7VRY3u1doBCV388en29XvV9fR9d/R48XDIrr6ODIsicD5CaQFTFRdlrgAX8f0OHGhC511vTznOwQcmvWKsNhDQNlZN5suEoW4GGnnpqeZysoLdBtdfP+6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f5rlV2tWn8qU1KO2UwdBtdfP+6/HZ/uXq+doMIPZIPQArvW90FCCWQek2h1FRSd242gG/dtvzvl62PPWnOpZmKdW9dmvNkucCxP5nL7i7CNmAWmFgMUoq3qed+5E8ld1u2NDZboMdey9lhTPJ99vYrTfZNs2sywfkV/wc= \ No newline at end of file diff --git a/openslides-autoupdate-service b/openslides-autoupdate-service index fa36ec3b3..3897450e0 160000 --- a/openslides-autoupdate-service +++ b/openslides-autoupdate-service @@ -1 +1 @@ -Subproject commit fa36ec3b33af85367ffdf769c43c296c1afca9cc +Subproject commit 3897450e038fb4ef6ed6e72f32d4ca613b31b347 diff --git a/openslides-backend b/openslides-backend index 2175dc2cc..fdbb91580 160000 --- a/openslides-backend +++ b/openslides-backend @@ -1 +1 @@ -Subproject commit 2175dc2ccc277c585891551acb22b7fcbccc0d40 +Subproject commit fdbb91580a8cd31ac23230b2f2a9fd5354599876 diff --git a/openslides-client b/openslides-client index bc083f8c0..0bc9c3ef3 160000 --- a/openslides-client +++ b/openslides-client @@ -1 +1 @@ -Subproject commit bc083f8c07e8952759f38831f636890a72a08f34 +Subproject commit 0bc9c3ef3fad0488ad4d914030ab50a2c3915f28 diff --git a/openslides-datastore-service b/openslides-datastore-service index daa548c25..3911fee5c 160000 --- a/openslides-datastore-service +++ b/openslides-datastore-service @@ -1 +1 @@ -Subproject commit daa548c253e761f65a426ca02d6c08a62a5bd221 +Subproject commit 3911fee5c58eda349dc574d93f2f782e6c95ce91