diff --git a/docker/setup_configuration/data.yaml b/docker/setup_configuration/data.yaml index eb1ae458..bfafff3a 100644 --- a/docker/setup_configuration/data.yaml +++ b/docker/setup_configuration/data.yaml @@ -1 +1,18 @@ -... +zgw_consumers_config_enable: true +zgw_consumers: + services: + - identifier: notifications-api + label: Notificaties API + api_root: http://notificaties.local/api/v1/ + api_connection_check_path: notificaties + api_type: nrc + auth_type: api_key + header_key: Authorization + header_value: Token ba9d233e95e04c4a8a661a27daffe7c9bd019067 + +notifications_config_enable: true +notifications_config: + notifications_api_service_identifier: notifications-api + notification_delivery_max_retries: 1 + notification_delivery_retry_backoff: 2 + notification_delivery_retry_backoff_max: 3 diff --git a/docs/installation/config_cli.rst b/docs/installation/config_cli.rst index ac0dfcc1..5ea762b8 100644 --- a/docs/installation/config_cli.rst +++ b/docs/installation/config_cli.rst @@ -46,6 +46,35 @@ Mozilla-django-oidc-db Sites configuration ------------------- +Notifications configuration +------------------------- + +To configure sending notifications for the application ensure there is a ``services`` +item present that matches the ``notifications_api_service_identifier`` in the +``notifications_config`` namespace: + +.. code-block:: yaml + ... + + zgw_consumers_config_enable: true + zgw_consumers: + services: + - identifier: notifications-api + label: Notificaties API + api_root: http://notificaties.local/api/v1/ + api_connection_check_path: notificaties + api_type: nrc + auth_type: api_key + + notifications_config_enable: true + notifications_config: + notifications_api_service_identifier: notifications-api + notification_delivery_max_retries: 1 + notification_delivery_retry_backoff: 2 + notification_delivery_retry_backoff_max: 3 + .... + + Execution ========= diff --git a/requirements/base.in b/requirements/base.in index 8621c029..360e2a3f 100644 --- a/requirements/base.in +++ b/requirements/base.in @@ -6,5 +6,5 @@ jsonschema furl # Common ground libraries -notifications-api-common +notifications-api-common[setup-configuration] zgw-consumers[setup-configuration] diff --git a/requirements/base.txt b/requirements/base.txt index 716ada15..447782ee 100644 --- a/requirements/base.txt +++ b/requirements/base.txt @@ -155,6 +155,7 @@ django-sessionprofile==3.0.0 # via open-api-framework django-setup-configuration==0.4.0 # via + # notifications-api-common # open-api-framework # zgw-consumers django-simple-certmanager==1.4.1 @@ -206,6 +207,7 @@ furl==2.1.3 # via # -r requirements/base.in # ape-pie + # notifications-api-common glom==23.5.0 # via # -r requirements/base.in @@ -242,7 +244,7 @@ mozilla-django-oidc==4.0.0 # via mozilla-django-oidc-db mozilla-django-oidc-db==0.19.0 # via open-api-framework -notifications-api-common==0.3.1 +notifications-api-common[setup-configuration]==0.4.0 # via # -r requirements/base.in # commonground-api-common diff --git a/requirements/ci.txt b/requirements/ci.txt index f7f994b2..81749ad6 100644 --- a/requirements/ci.txt +++ b/requirements/ci.txt @@ -242,6 +242,7 @@ django-sessionprofile==3.0.0 django-setup-configuration==0.4.0 # via # -r requirements/base.txt + # notifications-api-common # open-api-framework # zgw-consumers django-simple-certmanager==1.4.1 @@ -330,6 +331,7 @@ furl==2.1.3 # via # -r requirements/base.txt # ape-pie + # notifications-api-common glom==23.5.0 # via # -r requirements/base.txt @@ -404,7 +406,7 @@ multidict==6.0.5 # via yarl mypy-extensions==1.0.0 # via black -notifications-api-common==0.3.1 +notifications-api-common[setup-configuration]==0.4.0 # via # -r requirements/base.txt # commonground-api-common diff --git a/requirements/dev.txt b/requirements/dev.txt index 6d358b47..1c67a855 100644 --- a/requirements/dev.txt +++ b/requirements/dev.txt @@ -257,6 +257,7 @@ django-sessionprofile==3.0.0 django-setup-configuration==0.4.0 # via # -r requirements/base.txt + # notifications-api-common # open-api-framework # zgw-consumers django-simple-certmanager==1.4.1 @@ -351,6 +352,7 @@ furl==2.1.3 # via # -r requirements/base.txt # ape-pie + # notifications-api-common glom==23.5.0 # via # -r requirements/base.txt @@ -426,7 +428,7 @@ multidict==6.0.5 # via yarl mypy-extensions==0.4.3 # via black -notifications-api-common==0.3.1 +notifications-api-common[setup-configuration]==0.4.0 # via # -r requirements/base.txt # commonground-api-common diff --git a/src/objects/conf/base.py b/src/objects/conf/base.py index 8851e479..90e507b6 100644 --- a/src/objects/conf/base.py +++ b/src/objects/conf/base.py @@ -84,4 +84,5 @@ # SETUP_CONFIGURATION_STEPS = ( "zgw_consumers.contrib.setup_configuration.steps.ServiceConfigurationStep", + "notifications_api_common.contrib.setup_configuration.steps.NotificationConfigurationStep", )