diff --git a/docker/open-zaak/fixtures/open_zaak_fixtures.json b/docker/open-zaak/fixtures/open_zaak_fixtures.json
index a6052675ec..f775fa0987 100644
--- a/docker/open-zaak/fixtures/open_zaak_fixtures.json
+++ b/docker/open-zaak/fixtures/open_zaak_fixtures.json
@@ -28,7 +28,7 @@
"model": "catalogi.catalogus",
"pk": 1,
"fields": {
- "_etag": "ef26c6f8e32dd9cd50809442b635bb26",
+ "_etag": "6cecca4fea6af5d8acc582e1c52ce24b",
"naam": "Test catalog",
"uuid": "bd58635c-793e-446d-a7e0-460d7b04829d",
"domein": "TEST",
@@ -44,7 +44,7 @@
"model": "catalogi.catalogus",
"pk": 2,
"fields": {
- "_etag": "bed1ecff53402298e98e22eaa1756480",
+ "_etag": "c7d9351cfa9d1da17c623527f985d3ab",
"naam": "Test catalog 2",
"uuid": "630271f6-568a-485e-b1c4-4ed2d6ab3a58",
"domein": "OTHER",
@@ -428,6 +428,66 @@
"zaakobjecttypen": []
}
},
+{
+ "model": "catalogi.resultaattype",
+ "pk": 5,
+ "fields": {
+ "_etag": "8a969419db8fe099962d12872966b597",
+ "datum_begin_geldigheid": null,
+ "datum_einde_geldigheid": null,
+ "uuid": "5c8c7613-8ccc-4f17-836b-bd92489c77fd",
+ "zaaktype": 6,
+ "omschrijving": "Done",
+ "resultaattypeomschrijving": "https://selectielijst.openzaak.nl/api/v1/resultaattypeomschrijvingen/43ac0469-e0c0-4985-a6ce-8ec285d2df47",
+ "omschrijving_generiek": "Vastgesteld",
+ "selectielijstklasse": "https://selectielijst.openzaak.nl/api/v1/resultaten/afa30940-855b-4a7e-aa21-9e15a8078814",
+ "archiefnominatie": "vernietigen",
+ "archiefactietermijn": "P10Y",
+ "brondatum_archiefprocedure_afleidingswijze": "afgehandeld",
+ "brondatum_archiefprocedure_datumkenmerk": "",
+ "brondatum_archiefprocedure_einddatum_bekend": false,
+ "brondatum_archiefprocedure_objecttype": "",
+ "brondatum_archiefprocedure_registratie": "",
+ "brondatum_archiefprocedure_procestermijn": "P0D",
+ "toelichting": "",
+ "procesobjectaard": "",
+ "indicatie_specifiek": null,
+ "procestermijn": null,
+ "informatieobjecttypen": [],
+ "besluittypen": [],
+ "zaakobjecttypen": []
+ }
+},
+{
+ "model": "catalogi.resultaattype",
+ "pk": 6,
+ "fields": {
+ "_etag": "4571f087efcb36b2bcfb8e1ea6b46d62",
+ "datum_begin_geldigheid": null,
+ "datum_einde_geldigheid": null,
+ "uuid": "dddb1de8-a50a-477a-8e2e-ca0f69809033",
+ "zaaktype": 7,
+ "omschrijving": "Geslaagd",
+ "resultaattypeomschrijving": "https://selectielijst.openzaak.nl/api/v1/resultaattypeomschrijvingen/ce8cf476-0b59-496f-8eee-957a7c6e2506",
+ "omschrijving_generiek": "Afgebroken",
+ "selectielijstklasse": "https://selectielijst.openzaak.nl/api/v1/resultaten/afa30940-855b-4a7e-aa21-9e15a8078814",
+ "archiefnominatie": "vernietigen",
+ "archiefactietermijn": "P10Y",
+ "brondatum_archiefprocedure_afleidingswijze": "afgehandeld",
+ "brondatum_archiefprocedure_datumkenmerk": "",
+ "brondatum_archiefprocedure_einddatum_bekend": false,
+ "brondatum_archiefprocedure_objecttype": "",
+ "brondatum_archiefprocedure_registratie": "",
+ "brondatum_archiefprocedure_procestermijn": "P0D",
+ "toelichting": "",
+ "procesobjectaard": "",
+ "indicatie_specifiek": null,
+ "procestermijn": null,
+ "informatieobjecttypen": [],
+ "besluittypen": [],
+ "zaakobjecttypen": []
+ }
+},
{
"model": "catalogi.roltype",
"pk": 1,
@@ -506,6 +566,84 @@
"zaaktype": 5
}
},
+{
+ "model": "catalogi.roltype",
+ "pk": 9,
+ "fields": {
+ "_etag": "9d04e7c378c56302eb00326e6ab1d3f7",
+ "datum_begin_geldigheid": null,
+ "datum_einde_geldigheid": null,
+ "uuid": "5cdeb40f-1e28-415b-b826-1b36dac54232",
+ "omschrijving": "Draft",
+ "omschrijving_generiek": "belanghebbende",
+ "zaaktype": 2
+ }
+},
+{
+ "model": "catalogi.roltype",
+ "pk": 10,
+ "fields": {
+ "_etag": "aa54e599dca5d07546697d0b179834b4",
+ "datum_begin_geldigheid": null,
+ "datum_einde_geldigheid": null,
+ "uuid": "b79db762-5f02-43ea-b550-6de3519e7057",
+ "omschrijving": "Baliemedewerker",
+ "omschrijving_generiek": "klantcontacter",
+ "zaaktype": 2
+ }
+},
+{
+ "model": "catalogi.roltype",
+ "pk": 11,
+ "fields": {
+ "_etag": "4c6a59a0e427496fd8975b70486fcfc7",
+ "datum_begin_geldigheid": null,
+ "datum_einde_geldigheid": null,
+ "uuid": "d2a3dcde-e555-4a4a-83f3-7b1505ec6c9b",
+ "omschrijving": "Initiator",
+ "omschrijving_generiek": "initiator",
+ "zaaktype": 6
+ }
+},
+{
+ "model": "catalogi.roltype",
+ "pk": 12,
+ "fields": {
+ "_etag": "f0130713b20054fcb8dcdb6f658449b9",
+ "datum_begin_geldigheid": null,
+ "datum_einde_geldigheid": null,
+ "uuid": "a2700808-67e1-4db5-847e-2fb223b6c8f0",
+ "omschrijving": "Baliemedewerker",
+ "omschrijving_generiek": "klantcontacter",
+ "zaaktype": 6
+ }
+},
+{
+ "model": "catalogi.roltype",
+ "pk": 13,
+ "fields": {
+ "_etag": "cd5809383c4e56c095fd273b5258b475",
+ "datum_begin_geldigheid": null,
+ "datum_einde_geldigheid": null,
+ "uuid": "51199bc6-024f-4997-8199-733fd2d478f0",
+ "omschrijving": "Initiator",
+ "omschrijving_generiek": "initiator",
+ "zaaktype": 7
+ }
+},
+{
+ "model": "catalogi.roltype",
+ "pk": 14,
+ "fields": {
+ "_etag": "9dfa8ad719882e96bc078be4f351aca3",
+ "datum_begin_geldigheid": null,
+ "datum_einde_geldigheid": null,
+ "uuid": "877f0745-5292-4336-a6da-a5596c564aae",
+ "omschrijving": "Baliemedewerker",
+ "omschrijving_generiek": "klantcontacter",
+ "zaaktype": 7
+ }
+},
{
"model": "catalogi.statustype",
"pk": 1,
@@ -614,6 +752,78 @@
"toelichting": null
}
},
+{
+ "model": "catalogi.statustype",
+ "pk": 9,
+ "fields": {
+ "_etag": "0e25982cec3c27f4b7936e139318c251",
+ "datum_begin_geldigheid": null,
+ "datum_einde_geldigheid": null,
+ "uuid": "ec6587a5-0b91-427b-88a8-7aec1c10ff83",
+ "zaaktype": 6,
+ "statustype_omschrijving": "Opened",
+ "statustype_omschrijving_generiek": "",
+ "statustypevolgnummer": 10,
+ "doorlooptijd": null,
+ "informeren": false,
+ "statustekst": "",
+ "toelichting": null
+ }
+},
+{
+ "model": "catalogi.statustype",
+ "pk": 10,
+ "fields": {
+ "_etag": "6e489710f26b99e30e07b92fea5a575b",
+ "datum_begin_geldigheid": null,
+ "datum_einde_geldigheid": null,
+ "uuid": "16de698f-cc2f-4aa8-bb07-8ccfc71a4da3",
+ "zaaktype": 6,
+ "statustype_omschrijving": "Closed",
+ "statustype_omschrijving_generiek": "",
+ "statustypevolgnummer": 90,
+ "doorlooptijd": null,
+ "informeren": false,
+ "statustekst": "",
+ "toelichting": null
+ }
+},
+{
+ "model": "catalogi.statustype",
+ "pk": 11,
+ "fields": {
+ "_etag": "3d70d877cb2dcbfaf0d3932dc8145c34",
+ "datum_begin_geldigheid": null,
+ "datum_einde_geldigheid": null,
+ "uuid": "b4bfbe27-a332-4e48-adf3-b4005d5c5fb5",
+ "zaaktype": 7,
+ "statustype_omschrijving": "Ontvangen",
+ "statustype_omschrijving_generiek": "",
+ "statustypevolgnummer": 1,
+ "doorlooptijd": null,
+ "informeren": false,
+ "statustekst": "",
+ "toelichting": null
+ }
+},
+{
+ "model": "catalogi.statustype",
+ "pk": 12,
+ "fields": {
+ "_etag": "26f40737919a7f9817d845cc4c42a9a3",
+ "datum_begin_geldigheid": null,
+ "datum_einde_geldigheid": null,
+ "uuid": "a36f3a85-7499-4d09-b154-cdf832ebb96d",
+ "zaaktype": 7,
+ "statustype_omschrijving": "Afgerond",
+ "statustype_omschrijving_generiek": "",
+ "statustypevolgnummer": 5,
+ "doorlooptijd": null,
+ "informeren": false,
+ "statustekst": "",
+ "toelichting": null
+ }
+},
{
"model": "catalogi.zaaktype",
"pk": 1,
@@ -664,7 +874,7 @@
"model": "catalogi.zaaktype",
"pk": 2,
"fields": {
- "_etag": "0a14ada23852340b534f64d20764ac78",
+ "_etag": "6655847c7dcad71dba48bcfc3c07a0c3",
"datum_begin_geldigheid": "2023-01-01",
"datum_einde_geldigheid": null,
"concept": true,
@@ -797,5 +1007,97 @@
"catalogus": 1,
"deelzaaktypen": []
}
+},
+{
+ "model": "catalogi.zaaktype",
+ "pk": 6,
+ "fields": {
+ "_etag": "40da09c62d48854f504ac9dd5a3a3222",
+ "datum_begin_geldigheid": "2024-11-29",
+ "datum_einde_geldigheid": null,
+ "concept": false,
+ "uuid": "fcc3499a-04d4-421c-b115-7e3cba2127ac",
+ "identificatie": "ZT-002",
+ "zaaktype_omschrijving": "Test 2",
+ "zaaktype_omschrijving_generiek": "",
+ "vertrouwelijkheidaanduiding": "zaakvertrouwelijk",
+ "doel": "Tests",
+ "aanleiding": "Tests",
+ "toelichting": "",
+ "indicatie_intern_of_extern": "intern",
+ "handeling_initiator": "Tests",
+ "onderwerp": "Tests",
+ "handeling_behandelaar": "Tests",
+ "doorlooptijd_behandeling": "P1M",
+ "servicenorm_behandeling": "P0D",
+ "opschorting_en_aanhouding_mogelijk": false,
+ "verlenging_mogelijk": false,
+ "verlengingstermijn": null,
+ "trefwoorden": "[]",
+ "publicatie_indicatie": false,
+ "publicatietekst": "",
+ "verantwoordingsrelatie": "[]",
+ "versiedatum": "2024-11-29",
+ "verantwoordelijke": "Ontwikkelaar",
+ "producten_of_diensten": "[]",
+ "selectielijst_procestype": "https://selectielijst.openzaak.nl/api/v1/procestypen/aa8aa2fd-b9c6-4e34-9a6c-58a677f60ea0",
+ "selectielijst_procestype_jaar": 2020,
+ "referentieproces_naam": "Testen",
+ "referentieproces_link": "",
+ "broncatalogus_url": "",
+ "broncatalogus_domein": "",
+ "broncatalogus_rsin": "",
+ "bronzaaktype_url": "",
+ "bronzaaktype_identificatie": "",
+ "bronzaaktype_omschrijving": "",
+ "catalogus": 1,
+ "deelzaaktypen": []
+ }
+},
+{
+ "model": "catalogi.zaaktype",
+ "pk": 7,
+ "fields": {
+ "_etag": "5ed05ed8660025b30056f24ace9af15e",
+ "datum_begin_geldigheid": "2024-11-29",
+ "datum_einde_geldigheid": null,
+ "concept": false,
+ "uuid": "cc1d39d9-05a2-45f9-8cfe-230790d36f71",
+ "identificatie": "ZT-001",
+ "zaaktype_omschrijving": "Duplicate identification, other catalogue",
+ "zaaktype_omschrijving_generiek": "",
+ "vertrouwelijkheidaanduiding": "zaakvertrouwelijk",
+ "doel": "Tests",
+ "aanleiding": "Tests",
+ "toelichting": "",
+ "indicatie_intern_of_extern": "intern",
+ "handeling_initiator": "Tests",
+ "onderwerp": "Tests",
+ "handeling_behandelaar": "Tests",
+ "doorlooptijd_behandeling": "P1M",
+ "servicenorm_behandeling": "P0D",
+ "opschorting_en_aanhouding_mogelijk": false,
+ "verlenging_mogelijk": false,
+ "verlengingstermijn": null,
+ "trefwoorden": "[]",
+ "publicatie_indicatie": false,
+ "publicatietekst": "",
+ "verantwoordingsrelatie": "[]",
+ "versiedatum": "2024-11-29",
+ "verantwoordelijke": "Ontwikkelaar",
+ "producten_of_diensten": "[]",
+ "selectielijst_procestype": "https://selectielijst.openzaak.nl/api/v1/procestypen/aa8aa2fd-b9c6-4e34-9a6c-58a677f60ea0",
+ "selectielijst_procestype_jaar": 2020,
+ "referentieproces_naam": "Testen",
+ "referentieproces_link": "",
+ "broncatalogus_url": "",
+ "broncatalogus_domein": "",
+ "broncatalogus_rsin": "",
+ "bronzaaktype_url": "",
+ "bronzaaktype_identificatie": "",
+ "bronzaaktype_omschrijving": "",
+ "catalogus": 2,
+ "deelzaaktypen": []
+ }
}
]
diff --git a/src/openapi.yaml b/src/openapi.yaml
index 2a1e223c33..1d81cf358d 100644
--- a/src/openapi.yaml
+++ b/src/openapi.yaml
@@ -4087,6 +4087,62 @@ paths:
$ref: '#/components/headers/X-Is-Form-Designer'
Content-Language:
$ref: '#/components/headers/Content-Language'
+ /api/v2/registration/plugins/zgw-api/role-types:
+ get:
+ operationId: registration_plugins_zgw_api_role_types_list
+ description: |-
+ Fetch and serialize a list of objects.
+
+ Alternative to :class:`rest_framework.mixins.ListModelMixin` for non-database
+ backed collections of objects.
+ summary: List the available role types bound to a case type within a catalogue
+ (ZGW APIs)
+ parameters:
+ - in: query
+ name: case_type_identification
+ schema:
+ type: string
+ minLength: 1
+ description: Filter case types against this identification.
+ required: true
+ - in: query
+ name: catalogue_url
+ schema:
+ type: string
+ format: uri
+ title: catalogus URL
+ minLength: 1
+ description: Filter case types against this catalogue URL.
+ required: true
+ - in: query
+ name: zgw_api_group
+ schema:
+ type: integer
+ description: The primary key of the ZGW API group to use. The informatieobjecttypen
+ from the Catalogi API in this group will be returned.
+ required: true
+ tags:
+ - registration
+ security:
+ - cookieAuth: []
+ responses:
+ '200':
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/RoleType'
+ description: ''
+ headers:
+ X-Session-Expires-In:
+ $ref: '#/components/headers/X-Session-Expires-In'
+ X-CSRFToken:
+ $ref: '#/components/headers/X-CSRFToken'
+ X-Is-Form-Designer:
+ $ref: '#/components/headers/X-Is-Form-Designer'
+ Content-Language:
+ $ref: '#/components/headers/Content-Language'
/api/v2/service-fetch-configurations:
get:
operationId: service_fetch_configurations_list
@@ -9728,6 +9784,21 @@ components:
required:
- x
- y
+ RoleType:
+ type: object
+ properties:
+ description:
+ type: string
+ description: The description/label given to the role type in the Catalogi
+ API. It identifies the role type within a case type.
+ descriptionGeneric:
+ type: string
+ title: generic description
+ description: One of the pre-determined generic descriptions, such as 'behandelaar'
+ or 'belanghebbende'.
+ required:
+ - description
+ - descriptionGeneric
Service:
type: object
properties:
diff --git a/src/openforms/contrib/zgw/api/serializers.py b/src/openforms/contrib/zgw/api/serializers.py
index 79ed39bbe9..d5e5f3bacb 100644
--- a/src/openforms/contrib/zgw/api/serializers.py
+++ b/src/openforms/contrib/zgw/api/serializers.py
@@ -81,6 +81,23 @@ class DocumentTypeSerializer(serializers.Serializer):
)
+class RoleTypeSerializer(serializers.Serializer):
+ description = serializers.CharField(
+ label=_("description"),
+ help_text=_(
+ "The description/label given to the role type in the Catalogi API. It "
+ "identifies the role type within a case type."
+ ),
+ )
+ description_generic = serializers.CharField(
+ label=_("generic description"),
+ help_text=_(
+ "One of the pre-determined generic descriptions, such as 'behandelaar' "
+ "or 'belanghebbende'."
+ ),
+ )
+
+
class CaseTypeProductSerializer(serializers.Serializer):
url = serializers.CharField(
label=_("url"),
diff --git a/src/openforms/contrib/zgw/clients/catalogi.py b/src/openforms/contrib/zgw/clients/catalogi.py
index a6ab02329f..352ea7beca 100644
--- a/src/openforms/contrib/zgw/clients/catalogi.py
+++ b/src/openforms/contrib/zgw/clients/catalogi.py
@@ -50,6 +50,7 @@ class CaseType(TypedDict):
concept: NotRequired[bool]
productenOfDiensten: list[str] # URL pointers to products
informatieobjecttypen: NotRequired[list[str]] # URL pointers to document types
+ roltypen: NotRequired[list[str]] # URL pointers to role types
class InformatieObjectType(TypedDict):
@@ -63,6 +64,28 @@ class InformatieObjectType(TypedDict):
concept: NotRequired[bool]
+type PublicationStatusFilter = Literal["alles", "concept", "definitief"]
+
+type RoleDescriptionGeneric = Literal[
+ "adviseur",
+ "behandelaar",
+ "belanghebbende",
+ "beslisser",
+ "initiator",
+ "klantcontacter",
+ "zaakcoordinator",
+ "mede_initiator",
+]
+
+
+class RoleType(TypedDict):
+ url: str
+ zaaktype: str
+ zaaktypeIdentificatie: NotRequired[str] # since 1.2
+ omschrijving: str
+ omschrijvingGeneriek: RoleDescriptionGeneric
+
+
class EigenschapSpecificatie(TypedDict):
groep: NotRequired[str]
formaat: Literal["tekst", "getal", "datum", "datum_tijd"]
@@ -91,19 +114,28 @@ class Eigenschap(TypedDict):
class CaseTypeListParams(TypedDict, total=False):
catalogus: str
identificatie: str
- status: Literal["alles", "concept", "definitief"]
+ status: PublicationStatusFilter
datumGeldigheid: str
page: int
class InformatieObjectTypeListParams(TypedDict, total=False):
catalogus: str
- status: Literal["alles", "concept", "definitief"]
+ status: PublicationStatusFilter
omschrijving: str
datumGeldigheid: str
page: int
+class RoleTypeListParams(TypedDict, total=False):
+ zaaktype: str
+ zaaktypeIdentificatie: str # from 1.2 onwards
+ omschrijvingGeneriek: RoleDescriptionGeneric
+ status: PublicationStatusFilter
+ datumGeldigheid: str
+ page: int
+
+
class CatalogiClient(NLXClient):
_api_version: CatalogiAPIVersion | None = None
@@ -325,6 +357,69 @@ def list_statustypen(self, zaaktype: str) -> list[dict]:
results = response.json()["results"]
return results
+ def get_all_role_types(
+ self,
+ *,
+ catalogus: str,
+ within_casetype: str,
+ ) -> Iterator[RoleType]:
+ # get the case types so that we are filtering within the right catalogue, as
+ # the same case type identification may be defined in different catalogues
+ case_type_versions = (
+ self.find_case_types(
+ catalogus=catalogus,
+ identification=within_casetype,
+ )
+ or []
+ )
+ all_valid_roltype_urls: list[str] = sum(
+ (
+ case_type_version.get("roltypen", [])
+ for case_type_version in case_type_versions
+ ),
+ [],
+ )
+ if not all_valid_roltype_urls:
+ return []
+
+ _supports_filtering_case_type_identification = self.api_version >= (1, 2, 0)
+ params: RoleTypeListParams = {}
+ if self.allow_drafts:
+ params["status"] = "alles"
+
+ def _iter_case_type_versions() -> Iterator[PaginatedResponseData[RoleType]]:
+ data: PaginatedResponseData[RoleType]
+
+ if _supports_filtering_case_type_identification:
+ params["zaaktypeIdentificatie"] = within_casetype
+
+ response = self.get("roltypen", params=params) # type: ignore
+ response.raise_for_status()
+ data = response.json()
+ yield data
+
+ # fallback for old versions of the Catalogi API - get the roltypes for each
+ # retrieved version of the case type
+ else:
+ for case_type_version in case_type_versions:
+ params["zaaktype"] = case_type_version["url"]
+
+ response = self.get("roltypen", params=params) # type: ignore
+ response.raise_for_status()
+ data = response.json()
+ yield data
+
+ # for 1.2.0+, this effectively just gets all the role types in one batch by
+ # looping over all pages.
+ # for older versions, this will loop over all versions of the case type in the
+ # outer loop, and the inner loop will process all result pages for that
+ # particular case type version before moving on to the next version
+ for data in _iter_case_type_versions():
+ for role_type in pagination_helper(self, data):
+ if role_type["url"] not in all_valid_roltype_urls:
+ continue
+ yield role_type
+
def list_roltypen(
self,
zaaktype: str,
diff --git a/src/openforms/contrib/zgw/tests/test_catalogi_client.py b/src/openforms/contrib/zgw/tests/test_catalogi_client.py
index 01a34cc25f..68e2b88218 100644
--- a/src/openforms/contrib/zgw/tests/test_catalogi_client.py
+++ b/src/openforms/contrib/zgw/tests/test_catalogi_client.py
@@ -293,3 +293,95 @@ def test_server_supports_filtering_case_types_but_doesnt_enforce_unique_versions
identification="ZT-007",
valid_on=date(2024, 8, 8),
)
+
+ @requests_mock.Mocker()
+ def test_get_role_types_before_v12(self, m: requests_mock.Mocker):
+ client = CatalogiClient(base_url="https://dummy/")
+ client._api_version = (1, 0, 0)
+ # mocks to get available zaaktypen
+ zt_endpoint = furl("https://dummy/zaaktypen").set(
+ {
+ "catalogus": "https://dummy/catalogus",
+ "identificatie": "ZT-007",
+ }
+ )
+ m.get(
+ str(zt_endpoint),
+ headers={"API-Version": "1.0.0"},
+ json={
+ "next": None,
+ "previous": None,
+ "count": 2,
+ "results": [
+ {
+ "url": "https://dummy/api/v1/zaaktypen/1",
+ "identificatie": "ZT-007",
+ "beginGeldigheid": "2023-01-01",
+ "eindeGeldigheid": "2023-12-31",
+ "roltypen": [
+ "https://dummy/api/v1/roltypen/1",
+ ],
+ },
+ {
+ "url": "https://dummy/api/v1/zaaktypen/2",
+ "identificatie": "ZT-007",
+ "beginGeldigheid": "2024-01-01",
+ "roltypen": [
+ "https://dummy/api/v1/roltypen/2",
+ "https://dummy/api/v1/roltypen/3",
+ ],
+ },
+ ],
+ },
+ )
+
+ # mocks for two zaaktype versions
+ endpoint = furl("https://dummy/roltypen")
+ m.get(
+ str(endpoint.set({"zaaktype": "https://dummy/api/v1/zaaktypen/1"})),
+ headers={"API-Version": "1.0.0"},
+ json={
+ "next": None,
+ "previous": None,
+ "count": 1,
+ "results": [
+ {
+ "url": "https://dummy/api/v1/roltypen/1",
+ "zaaktype": "https://dummy/api/v1/zaaktypen/1",
+ "omschrijving": "Baliemedewerker",
+ "omschrijvingGeneriek": "klantcontacter",
+ },
+ ],
+ },
+ )
+ m.get(
+ str(endpoint.set({"zaaktype": "https://dummy/api/v1/zaaktypen/2"})),
+ headers={"API-Version": "1.0.0"},
+ json={
+ "next": None,
+ "previous": None,
+ "count": 2,
+ "results": [
+ {
+ "url": "https://dummy/api/v1/roltypen/2",
+ "zaaktype": "https://dummy/api/v1/zaaktypen/2",
+ "omschrijving": "Baliemedewerker",
+ "omschrijvingGeneriek": "klantcontacter",
+ },
+ {
+ "url": "https://dummy/api/v1/roltypen/3",
+ "zaaktype": "https://dummy/api/v1/zaaktypen/2",
+ "omschrijving": "Behandelaar",
+ "omschrijvingGeneriek": "behandelaar",
+ },
+ ],
+ },
+ )
+
+ results = client.get_all_role_types(
+ catalogus="https://dummy/catalogus",
+ within_casetype="ZT-007",
+ )
+
+ all_results = list(results)
+ self.assertEqual(len(all_results), 3)
diff --git a/src/openforms/js/compiled-lang/en.json b/src/openforms/js/compiled-lang/en.json
index 56c6b49f27..19f6fc0f02 100644
--- a/src/openforms/js/compiled-lang/en.json
+++ b/src/openforms/js/compiled-lang/en.json
@@ -1237,6 +1237,12 @@
"value": "Confidentiality"
}
],
+ "AdyBdF": [
+ {
+ "type": 0,
+ "value": "Something went wrong while retrieving the available role types defined in the selected case. Please check that the services in the selected API group are configured correctly."
+ }
+ ],
"AtBVAV": [
{
"type": 0,
diff --git a/src/openforms/js/compiled-lang/nl.json b/src/openforms/js/compiled-lang/nl.json
index 5adf4e2df3..0c6c0e3eca 100644
--- a/src/openforms/js/compiled-lang/nl.json
+++ b/src/openforms/js/compiled-lang/nl.json
@@ -1241,6 +1241,12 @@
"value": "Vertrouwelijkheidaanduiding"
}
],
+ "AdyBdF": [
+ {
+ "type": 0,
+ "value": "Something went wrong while retrieving the available role types defined in the selected case. Please check that the services in the selected API group are configured correctly."
+ }
+ ],
"AtBVAV": [
{
"type": 0,
diff --git a/src/openforms/js/components/admin/form_design/RegistrationFields.stories.js b/src/openforms/js/components/admin/form_design/RegistrationFields.stories.js
index a2ba06bcbc..54035a01e9 100644
--- a/src/openforms/js/components/admin/form_design/RegistrationFields.stories.js
+++ b/src/openforms/js/components/admin/form_design/RegistrationFields.stories.js
@@ -9,8 +9,10 @@ import {
} from 'components/admin/form_design/registrations/objectsapi/mocks';
import {
mockCaseTypesGet,
- mockProductsGet,
mockCataloguesGet as mockZGWApisCataloguesGet,
+ mockDocumenTypesGet as mockZGWApisDocumenTypesGet,
+ mockProductsGet as mockZGWApisProductsGet,
+ mockRoleTypesGet as mockZGWApisRoleTypesGet,
} from 'components/admin/form_design/registrations/zgw/mocks';
import {
FormDecorator,
@@ -511,7 +513,13 @@ export default {
mockObjectsApiCataloguesGet(),
mockDocumentTypesGet(),
],
- zgwMocks: [mockZGWApisCataloguesGet(), mockCaseTypesGet(), mockProductsGet()],
+ zgwMocks: [
+ mockZGWApisCataloguesGet(),
+ mockCaseTypesGet(),
+ mockZGWApisDocumenTypesGet(),
+ mockZGWApisRoleTypesGet(),
+ mockZGWApisProductsGet(),
+ ],
camundaMocks: [mockProcessDefinitionsGet()],
},
},
diff --git a/src/openforms/js/components/admin/form_design/registrations/zgw/OptionalOptionsFieldset.js b/src/openforms/js/components/admin/form_design/registrations/zgw/OptionalOptionsFieldset.js
index 156cd40ecd..7f3a41c0b7 100644
--- a/src/openforms/js/components/admin/form_design/registrations/zgw/OptionalOptionsFieldset.js
+++ b/src/openforms/js/components/admin/form_design/registrations/zgw/OptionalOptionsFieldset.js
@@ -31,7 +31,19 @@ const OptionalOptionsFieldset = ({confidentialityLevelChoices, catalogueUrl}) =>
-
+
+
+ }
+ >
+
+
(
-
+