From 4dfa86c62ac3745989945117e9f764230008c376 Mon Sep 17 00:00:00 2001 From: Dennis Neufeld Date: Fri, 6 Nov 2020 18:02:41 +0100 Subject: modified reducer documentation --- anastasis.rst | 462 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 461 insertions(+), 1 deletion(-) (limited to 'anastasis.rst') diff --git a/anastasis.rst b/anastasis.rst index 22e66d1c..e9f63e44 100644 --- a/anastasis.rst +++ b/anastasis.rst @@ -920,6 +920,36 @@ Reducer transitions ^^^^^^^^^^^^^^^^^^^ In the following, the individual transitions will be specified in more detail. + +Initial state +""""""""""""" + +The initial states for backup and recovery processes are looking like following: + +**Initial backup state:** +:: + + { + "backup_state": "CONTINENT_SELECTING", + "continents": [ + "Europe", + "North_America" + ] + } + + +**Initial backup state:** +:: + + { + "recovery_state": "CONTINENT_SELECTING", + "continents": [ + "Europe", + "North_America" + ] + } + + Common transitions """""""""""""""""" @@ -936,7 +966,41 @@ Expected new state: :: { - + "backup_state": "COUNTRY_SELECTING", + "continents": [ + "Europe", + "North_America" + ], + "selected_continent": "Europe", + "countries": [ + { + "code": "ch", + "name": "Switzerland", + "continent": "Europe", + "name_i18n": { + "de_DE": "Schweiz", + "de_CH": "Schwiiz", + "fr": "Suisse", + "en": "Swiss" + }, + "currency": "CHF" + }, + { + "code": "de", + "name": "Germany", + "continent": "Europe", + "continent_i18n": { + "de": "Europa" + }, + "name_i18n": { + "de_DE": "Deutschland", + "de_CH": "Deutschland", + "fr": "Allemagne", + "en": "Germany" + }, + "currency": "EUR" + } + ] } **select_country:** @@ -950,6 +1014,131 @@ Arguments (example): "currency": "EUR" } +Expected new state: +:: + + { + "backup_state": "USER_ATTRIBUTES_COLLECTING", + "continents": [ + "Europe", + "North_America" + ], + "selected_continent": "Europe", + "countries": [ + { + "code": "ch", + "name": "Switzerland", + "continent": "Europe", + "name_i18n": { + "de_DE": "Schweiz", + "de_CH": "Schwiiz", + "fr": "Suisse", + "en": "Swiss" + }, + "currency": "CHF" + }, + { + "code": "de", + "name": "Germany", + "continent": "Europe", + "continent_i18n": { + "de": "Europa" + }, + "name_i18n": { + "de_DE": "Deutschland", + "de_CH": "Deutschland", + "fr": "Allemagne", + "en": "Germany" + }, + "currency": "EUR" + } + ], + "selected_country": "de", + "currency": "EUR", + "required_attributes": [ + { + "type": "string", + "name": "full_name", + "label": "Full name", + "label_i18n": { + "de_DE": "Vollstaendiger Name", + "de_CH": "Vollstaendiger Name", + "fr": "Nom complet", + "en": "Full name" + }, + "widget": "anastasis_gtk_ia_full_name" + }, + { + "type": "date", + "name": "birthdate", + "label": "Birthdate", + "label_i18n": { + "de_DE": "Geburtsdatum", + "de_CH": "Geburtsdatum", + "fr": "Date de naissance", + "en": "Birthdate" + }, + "widget": "anastasis_gtk_ia_birthdate" + }, + { + "type": "string", + "name": "social_security_number", + "label": "Social security number", + "label_i18n": { + "de_DE": "Sozialversicherungsnummer", + "de_CH": "Sozialversicherungsnummer", + "fr": "Numéro de sécurité sociale", + "en": "Social security number" + }, + "widget": "anastasis_gtk_ia_ssn" + } + ], + "authentication_providers": { + "question": [ + { + "anastasis_04": { + "method_cost": "EUR:0", + "annual_cost": "EUR:4.99", + "insurance": "EUR:1", + "provider_url": "localhost:8089/", + "provider_name": "Anastasis 4", + "provider_salt": "CXAPCKSH9D3MYJTS9536RHJHCW" + } + }, + { + "anastasis_03": { + "method_cost": "EUR:0", + "annual_cost": "EUR:4.99", + "insurance": "EUR:1", + "provider_url": "localhost:8088/", + "provider_name": "Anastasis 3", + "provider_salt": "CXAPCKSH9D3MYJTS9536RHJHCW" + } + }, + { + "anastasis_02": { + "method_cost": "EUR:0", + "annual_cost": "EUR:1.99", + "insurance": "EUR:1", + "provider_url": "localhost:8087/", + "provider_name": "Anastasis 2", + "provider_salt": "CXAPCKSH9D3MYJTS9536RHJHCW" + } + }, + { + "anastasis_01": { + "method_cost": "EUR:0", + "annual_cost": "EUR:4.99", + "insurance": "EUR:1", + "provider_url": "localhost:8086/", + "provider_name": "Anastasis 1", + "provider_salt": "CXAPCKSH9D3MYJTS9536RHJHCW" + } + } + ] + } + } + **enter_user_attributes:** @@ -966,6 +1155,137 @@ Arguments (example): } } +Expected new state (backup process): +:: + + { + "backup_state": "AUTHENTICATIONS_EDITING", + "continents": [ + "Europe", + "North_America" + ], + "selected_continent": "Europe", + "countries": [ + { + "code": "ch", + "name": "Switzerland", + "continent": "Europe", + "name_i18n": { + "de_DE": "Schweiz", + "de_CH": "Schwiiz", + "fr": "Suisse", + "en": "Swiss" + }, + "currency": "CHF" + }, + { + "code": "de", + "name": "Germany", + "continent": "Europe", + "continent_i18n": { + "de": "Europa" + }, + "name_i18n": { + "de_DE": "Deutschland", + "de_CH": "Deutschland", + "fr": "Allemagne", + "en": "Germany" + }, + "currency": "EUR" + } + ], + "selected_country": "de", + "currency": "EUR", + "required_attributes": [ + { + "type": "string", + "name": "full_name", + "label": "Full name", + "label_i18n": { + "de_DE": "Vollstaendiger Name", + "de_CH": "Vollstaendiger Name", + "fr": "Nom complet", + "en": "Full name" + }, + "widget": "anastasis_gtk_ia_full_name" + }, + { + "type": "date", + "name": "birthdate", + "label": "Birthdate", + "label_i18n": { + "de_DE": "Geburtsdatum", + "de_CH": "Geburtsdatum", + "fr": "Date de naissance", + "en": "Birthdate" + }, + "widget": "anastasis_gtk_ia_birthdate" + }, + { + "type": "string", + "name": "social_security_number", + "label": "Social security number", + "label_i18n": { + "de_DE": "Sozialversicherungsnummer", + "de_CH": "Sozialversicherungsnummer", + "fr": "Numéro de sécurité sociale", + "en": "Social security number" + }, + "widget": "anastasis_gtk_ia_ssn" + } + ], + "authentication_providers": { + "question": [ + { + "anastasis_04": { + "method_cost": "EUR:0", + "annual_cost": "EUR:4.99", + "insurance": "EUR:1", + "provider_url": "localhost:8089/", + "provider_name": "Anastasis 4", + "provider_salt": "CXAPCKSH9D3MYJTS9536RHJHCW" + } + }, + { + "anastasis_03": { + "method_cost": "EUR:0", + "annual_cost": "EUR:4.99", + "insurance": "EUR:1", + "provider_url": "localhost:8088/", + "provider_name": "Anastasis 3", + "provider_salt": "CXAPCKSH9D3MYJTS9536RHJHCW" + } + }, + { + "anastasis_02": { + "method_cost": "EUR:0", + "annual_cost": "EUR:1.99", + "insurance": "EUR:1", + "provider_url": "localhost:8087/", + "provider_name": "Anastasis 2", + "provider_salt": "CXAPCKSH9D3MYJTS9536RHJHCW" + } + }, + { + "anastasis_01": { + "method_cost": "EUR:0", + "annual_cost": "EUR:4.99", + "insurance": "EUR:1", + "provider_url": "localhost:8086/", + "provider_name": "Anastasis 1", + "provider_salt": "CXAPCKSH9D3MYJTS9536RHJHCW" + } + } + ] + }, + "identity_attributes": { + "full_name": "Max Musterman", + "social_security_number": "123456789", + "birth_year": "2000", + "birth_month": "01", + "birth_day": "01" + } + } **next**, **back**, **pay:** @@ -991,6 +1311,146 @@ Arguments (example): } } +Expected new state: +:: + + { + "backup_state": "AUTHENTICATIONS_EDITING", + "continents": [ + "Europe", + "North_America" + ], + "selected_continent": "Europe", + "countries": [ + { + "code": "ch", + "name": "Switzerland", + "continent": "Europe", + "name_i18n": { + "de_DE": "Schweiz", + "de_CH": "Schwiiz", + "fr": "Suisse", + "en": "Swiss" + }, + "currency": "CHF" + }, + { + "code": "de", + "name": "Germany", + "continent": "Europe", + "continent_i18n": { + "de": "Europa" + }, + "name_i18n": { + "de_DE": "Deutschland", + "de_CH": "Deutschland", + "fr": "Allemagne", + "en": "Germany" + }, + "currency": "EUR" + } + ], + "selected_country": "de", + "currency": "EUR", + "required_attributes": [ + { + "type": "string", + "name": "full_name", + "label": "Full name", + "label_i18n": { + "de_DE": "Vollstaendiger Name", + "de_CH": "Vollstaendiger Name", + "fr": "Nom complet", + "en": "Full name" + }, + "widget": "anastasis_gtk_ia_full_name" + }, + { + "type": "date", + "name": "birthdate", + "label": "Birthdate", + "label_i18n": { + "de_DE": "Geburtsdatum", + "de_CH": "Geburtsdatum", + "fr": "Date de naissance", + "en": "Birthdate" + }, + "widget": "anastasis_gtk_ia_birthdate" + }, + { + "type": "string", + "name": "social_security_number", + "label": "Social security number", + "label_i18n": { + "de_DE": "Sozialversicherungsnummer", + "de_CH": "Sozialversicherungsnummer", + "fr": "Numéro de sécurité sociale", + "en": "Social security number" + }, + "widget": "anastasis_gtk_ia_ssn" + } + ], + "authentication_providers": { + "question": [ + { + "anastasis_04": { + "method_cost": "EUR:0", + "annual_cost": "EUR:4.99", + "insurance": "EUR:1", + "provider_url": "localhost:8089/", + "provider_name": "Anastasis 4", + "provider_salt": "CXAPCKSH9D3MYJTS9536RHJHCW" + } + }, + { + "anastasis_03": { + "method_cost": "EUR:0", + "annual_cost": "EUR:4.99", + "insurance": "EUR:1", + "provider_url": "localhost:8088/", + "provider_name": "Anastasis 3", + "provider_salt": "CXAPCKSH9D3MYJTS9536RHJHCW" + } + }, + { + "anastasis_02": { + "method_cost": "EUR:0", + "annual_cost": "EUR:1.99", + "insurance": "EUR:1", + "provider_url": "localhost:8087/", + "provider_name": "Anastasis 2", + "provider_salt": "CXAPCKSH9D3MYJTS9536RHJHCW" + } + }, + { + "anastasis_01": { + "method_cost": "EUR:0", + "annual_cost": "EUR:4.99", + "insurance": "EUR:1", + "provider_url": "localhost:8086/", + "provider_name": "Anastasis 1", + "provider_salt": "CXAPCKSH9D3MYJTS9536RHJHCW" + } + } + ] + }, + "identity_attributes": { + "full_name": "Max Musterman", + "social_security_number": "123456789", + "birth_year": "2000", + "birth_month": "01", + "birth_day": "01" + }, + "authentication_methods": [ + { + "method": "question", + "data": { + "question": "Whats your name?", + "answer": "Hans" + } + } + ] + } **del_authentication:** -- cgit v1.2.3