Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev to main #139

Merged
merged 27 commits into from
Dec 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
3fe8ad1
First endpoint fixes
rubenvdlinde Dec 7, 2024
89435d5
Merge remote-tracking branch 'origin/development' into feature/CONNEC…
rubenvdlinde Dec 7, 2024
7b388dd
Merge remote-tracking branch 'origin/development' into feature/CONNEC…
rubenvdlinde Dec 14, 2024
9065d3d
First real code on endpoints
rubenvdlinde Dec 15, 2024
b8f6895
First real code on endpoints
rubenvdlinde Dec 15, 2024
b624417
Working get endpoints
rjzondervan Dec 17, 2024
0cc81ad
Mappings and config added for xxllnc v1 -> zgw
bbrands02 Dec 17, 2024
abfa0f5
Add authorization to endpoints
rjzondervan Dec 18, 2024
e40da74
Set user id in consumer
rjzondervan Dec 18, 2024
1c7ea85
Docblocks on authorization service
rjzondervan Dec 18, 2024
5a6fe09
PR comments
rjzondervan Dec 18, 2024
bf178e6
More handling of PR comments
rjzondervan Dec 18, 2024
f35e9f3
Yet some more PR comments
rjzondervan Dec 18, 2024
75760f5
First sketch logic on endpoint data
rjzondervan Dec 18, 2024
922e9fc
zgw mapping fixes
bbrands02 Dec 19, 2024
268db67
applyConfigDot for extra data requests
bbrands02 Dec 19, 2024
59fee5e
Add conditions on endpoints for testing parameters and headers
rjzondervan Dec 19, 2024
c061113
Merge pull request #137 from ConductionNL/feature/CONNECTOR-50/endpoi…
rjzondervan Dec 19, 2024
b2a4b21
Add docblock
rjzondervan Dec 19, 2024
8b51f89
Pr review
WilcoLouwerse Dec 19, 2024
66ddae3
Fix originId and extra fetching
bbrands02 Dec 19, 2024
7d955ae
Merge pull request #138 from ConductionNL/feature/JSON-logic-endpoints
rjzondervan Dec 19, 2024
59450fb
Merge remote-tracking branch 'origin/main' into development
rjzondervan Dec 19, 2024
636fc2a
Merge pull request #140 from ConductionNL/fix/main-to-dev
rjzondervan Dec 19, 2024
9babc0d
Mapping fixes
bbrands02 Dec 19, 2024
fa8be6b
remove copy
bbrands02 Dec 19, 2024
30e7b4a
Merge pull request #141 from ConductionNL/feature/xxllnc-zgw-mappings
bbrands02 Dec 19, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions appinfo/routes.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

return [
'resources' => [
'Endpoints' => ['url' => 'api/endpoints'],
'Sources' => ['url' => 'api/sources'],
'Mappings' => ['url' => 'api/mappings'],
'Jobs' => ['url' => 'api/jobs'],
'Synchronizations' => ['url' => 'api/synchronizations'],
'Endpoints' => ['url' => 'api/endpoints'],
'Consumers' => ['url' => 'api/consumers'],
],
'routes' => [
Expand All @@ -24,10 +24,10 @@
['name' => 'mappings#test', 'url' => '/api/mappings/test', 'verb' => 'POST'],
['name' => 'mappings#saveObject', 'url' => '/api/mappings/objects', 'verb' => 'POST'],
['name' => 'mappings#getObjects', 'url' => '/api/mappings/objects', 'verb' => 'GET'],
// Running endpoints
['name' => 'endpoints#run', 'url' => '/api/v1/{endpoint}', 'verb' => 'GET'],
['name' => 'endpoints#run', 'url' => '/api/v1/{endpoint}', 'verb' => 'PUT'],
['name' => 'endpoints#run', 'url' => '/api/v1/{endpoint}', 'verb' => 'POST'],
['name' => 'endpoints#run', 'url' => '/api/v1/{endpoint}', 'verb' => 'DELETE'],
// Running endpoints - allow any path after /api/endpoints/
['name' => 'endpoints#handlePath', 'url' => '/api/endpoint/{_path}', 'verb' => 'GET', 'requirements' => ['_path' => '.+']],
// ['name' => 'endpoints#handlePath', 'url' => '/api/endpoint/{path}', 'verb' => 'PUT', 'requirements' => ['path' => '.+']],
// ['name' => 'endpoints#handlePath', 'url' => '/api/endpoint/{path}', 'verb' => 'POST', 'requirements' => ['path' => '.+']],
// ['name' => 'endpoints#handlePath', 'url' => '/api/endpoint/{path}', 'verb' => 'DELETE', 'requirements' => ['path' => '.+']],
],
];
44 changes: 44 additions & 0 deletions configurations/xxllnc-zgw/mappings/xxllnc-v1-case-to-zgw-zaak.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{
"name": "Xxllnc Case to ZGW Zaak",
"version": "0.0.1",
"mapping": {
"identificatie": "reference",
"omschrijving": "instance.subject",
"toelichting": "instance.subject_external",
"registratiedatum": "instance.date_of_registration",
"startdatum": "instance.date_of_registration",
"einddatum": "instance.date_of_completion",
"einddatumGepland": "instance.date_target",
"publicatiedatum": "instance.date_target",
"communicatiekanaal": "instance.channel_of_contact",
"vertrouwelijkheidaanduidng": "instance.confidentiality.mapped",
"kenmerken.0.kenmerk": "reference",
"kenmerken.0.bron": "xxllnc v1 api",
"betalingsindicatie": "{% if instance.price == '-' %}{{ 'nvt' }}{% elseif instance.payment_status is null or instance.payment_status == '' %}{{ 'nog_niet' }}{% else %}{{ 'geheel' }}{% endif %}",
"betalingsindicatieWeergave": "{% if instance.price == '-' %}{{ 'Zaak kent geen prijs' }}{% elseif instance.payment_status is null or instance.payment_status == '' %}{{ 'Er moet nog betaald worden' }}{% else %}{{ 'De volledige kosten zijn betaald' }}{% endif %}",
"resultaattoelichting": "{% if instance.outcome.instance.name|default %}{{ instance.outcome.instance.name }}{% endif %}",
"resultaat": "{% if instance.outcome|default %}{% set data = {'outcome': instance.outcome, 'resultaattypen': zaaktype.resultaattypen} %}{{ executeMapping(2, data)|json_encode }}{% endif %}",
"rollen": "[{% if instance.route.instance.role|default %}{% set dataRol = {'requestor': instance.requestor, 'role': instance.route.instance.role, 'roltypen': zaaktype.roltypen} %}{{ executeMapping(3, dataRol)|json_encode }}{% endif %}]",
"status": "{% if instance.milestone|default %}{% set data = {'milestone': instance.milestone, 'statustypen': zaaktype.statustypen} %}{{ executeMapping(4, data)|json_encode }}{% endif %}",
"zaaktype": "{% if casetype|default %}{{ executeMapping(5, casetype)|json_encode }}{% endif %}",
"eigenschappen": "[{% set index=0 %}{% if zaaktype.eigenschappen|default %}{% for key, attribute in instance.attributes %}{% if index != 0 %},{% endif %}{% set data = {'name': key, 'value': attribute, 'eigenschappen': zaaktype.eigenschappen} %}{% if attribute[0][0]|default and attribute[0][0] is iterable %}{{ attribute|json_encode }}{% else %}{{ executeMapping(6, data)|json_encode }}{% endif %}{% set index=index+1 %}{% endfor %}{% endif %}]",
"zaakinformatieobjecten": "[{% set index=0 %}{% if documents.result.instance.rows|default %}{% for document in documents.result.instance.rows %}{% set document = document|merge({'caseId': reference}) %}{% if index != 0 %},{% endif %}{{ executeMapping(7, document)|json_encode }}{% set index=index+1 %}{% endfor %}{% endif %}]",
"bronorganisatie": "bronorganisatie",
"verantwoordelijkeOrganisatie": "bronorganisatie",
"opschorting.indicatie": "{% if instance.stalled_until|default %}true{% else %}{% endif %}",
"opschorting.reden": "{% if instance.stalled_until|default %}Unknown{% endif %}"
},
"unset": [],
"cast": {
"resultaat": "jsonToArray",
"rollen": "jsonToArray",
"status": "jsonToArray",
"eigenschappen": "jsonToArray",
"opschorting.indicatie": "unsetIfValue==",
"opschorting.reden": "unsetIfValue==",
"opschorting": "unsetIfValue==",
"zaakinformatieobjecten": "jsonToArray",
"zaaktype": "jsonToArray"
},
"passTrough": false
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"name": "Xxllnc Casetype to ZGW ZaakType",
"version": "0.0.1",
"mapping": {
"identificatie": "instance.legacy.zaaktype_id",
"catalogus": "_catalogus",
"onderwerp": "instance.title",
"indicatieInternOfExtern": "extern",
"doorlooptijd": "{% if instance.properties.lead_time_legal.weken|default %}P{{ instance.properties.lead_time_legal.weken }}W{% elseif instance.properties.lead_time_legal.kalenderdagen|default %}P{{ instance.properties.lead_time_legal.kalenderdagen }}D{% else %}{{ \"\" }}{% endif %}",
"servicenorm": "{% if instance.properties.lead_time_service.weken|default %}P{{ instance.properties.lead_time_service.weken }}W{% elseif instance.properties.lead_time_service.kalenderdagen|default %}P{{ instance.properties.lead_time_service.kalenderdagen }}D{% else %}{{ \"\" }}{% endif %}",
"vertrouwelijkheidaanduiding": "{{ instance.properties.designation_of_confidentiality|lower }}",
"verlengingMogelijk": "instance.properties.extension",
"publicatieIndicatie": "instance.properties.publication",
"omschrijving": "instance.title",
"opschortingEnAanhoudingMogelijk": "instance.properties.suspension",
"bronzaaktype.url": "url",
"bronzaaktype.identificatie": "reference",
"bronzaaktype.omschrijving": "instance.title",
"referentieproces.naam": "preview",
"verantwoordelijke": "instance.properties.supervisor"
},
"unset": [],
"cast": {
"identificatie": "unsetIfValue==instance.legacy.zaaktype_id"
},
"passTrough": false
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"name": "Xxllnc Document to ZGW ZaakInformatieObject",
"version": "0.0.1",
"mapping": {
"titel": "instance.name",
"registratiedatum": "instance.file.instance.date_created",
"informatieobject.identificatie": "instance.number",
"informatieobject.creatiedatum": "instance.file.instance.date_created",
"informatieobject.titel": "instance.name",
"informatieobject.vertrouwelijksheidaanduiding": "{% if instance.metadata.instance.trust_level|default %}{{ instance.metadata.instance.trust_level|lower }}{% endif %}",
"informatieobject.formaat": "instance.file.instance.mimetype",
"informatieobject.versie": "1",
"informatieobject.beginRegistratie": "instance.file.instance.date_modified",
"informatieobject.bestandsnaam": "instance.filename",
"informatieobject.bestandsomvang": "instance.file.instance.size",
"informatieobject.verschijningsvorm": "{% if instance.metadata.instance.category|default %}{{ instance.metadata.instance.category }}{% endif %}",
"informatieobject.integriteit.algoritme": "{% if instance.file.instance|default %}{% set algoritmeArray = ['crc_16','crc_32','crc_64','fletcher4','fletcher8','fletcher16','fletcher32','hmac','md5','sha_1','sha_256','sha_512','sha_3'] %}{% for algoritme in algoritmeArray %}{% if result.instance.file.instance[algoritme]|default %}{{ algoritme }}{% endif %}{% endfor %}{% endif %}",
"informatieobject.integriteit.waarde": "{% if instance.file.instance|default %}{% set algoritmeArray = ['crc_16','crc_32','crc_64','fletcher4','fletcher8','fletcher16','fletcher32','hmac','md5','sha_1','sha_256','sha_512','sha_3'] %}{% for algoritme in algoritmeArray %}{% if result.instance.file.instance[algoritme]|default %}{{ result.instance.file.instance[algoritme] }}{% endif %}{% endfor %}{% endif %}",
"informatieobject.integriteit.datum": "instance.file.instance.date_created",
"informatieobject.inhoud": "{\"downloadUrl\": \"{{ 'https://xxllncapiv1/case/'~caseId~'/document/'~reference~'/download' }}\", \"source\": \"2\"}"
},
"unset": [],
"cast": {
"informatieobject.versie": "integer",
"informatieobject.bestandsomvang": "integer",
"informatieobject.inhoud": "jsonToArray"
},
"passTrough": false
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"name": "Xxllnc Milestone to ZGW Status",
"version": "0.0.1",
"mapping": {
"datumStatusGezet": "milestone.instance.date_modified",
"statustoelichting": "milestone.instance.phase_label",
"indicatieLaatstGezetteStatus": "{{ true }}",
"statustype": "{% for statustype in statustypen %}{% if statustype.omschrijving == milestone.instance.phase_label %}{{ statustype['_self']['id'] }}{% endif %}{% endfor %}"
},
"unset": [],
"cast": {
"indicatieLaatstGezetteStatus": "bool",
"statustype": "unsetIfValue=="
},
"passTrough": false
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"name": "Xxllnc Outcome to ZGW Resultaat",
"version": "0.0.1",
"mapping": {
"toelichting": "{% if outcome.instance.name|default %}{{ outcome.instance.name }}{% endif %}",
"resultaattype": "{% if resultaattypen|default %}{% for resultaattype in resultaattypen %}{% if resultaattype.toelichting == outcome.instance.name %}{{ resultaattype['_self']['id'] }}{% endif %}{% endfor %}{% endif %}"
},
"unset": [],
"cast": {
"resultaattype": "unsetIfValue=="
},
"passTrough": false
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"name": "Xxllnc RoleRequestor to ZGW Rol",
"version": "0.0.1",
"mapping": {
"betrokkeneType": "{% if role.instance.name|default %}{% if role.instance.name == 'Behandelaar'|lower %}medewerker{% else %}medewerker{% endif %}{% endif %}",
"omschrijving": "{% if role.instance.name|default %}{{ role.instance.name }}{% endif %}",
"omschrijvingGeneriek": "{% if role.instance.description|default %}{{ role.instance.description }}{% endif %}",
"roltoelichting": "{% if role.instance.name|default %}{{ role.instance.name }}{% endif %}",
"registratiedatum": "{% if role.instance.date_created|default %}{{ role.instance.date_created }}{% endif %}",
"contactpersoonRol.emailadres": "{% if requestor.instance.subject.instance.email_adress|default %}{{ requestor.instance.subject.instance.email_adress }}{% endif %}",
"contactpersoonRol.functie": "{% if requestor.instance.subject.instance.positions.instance.rows|default %}{% for position in requestor.instance.subject.instance.positions.instance.rows %}{% if role.preview|default %}{{ role.preview }}{% endif %}{% endfor %}{% endif %}",
"contactpersoonRol.telefoonnummer": "{% if requestor.instance.subject.instance.phone_number|default %}{{ requestor.instance.subject.instance.phone_number }}{% endif %}",
"contactpersoonRol.naam": "{% if requestor.instance.subject.instance.firstname|default %}{{ requestor.instance.subject.instance.firstname }} {% endif %}{% if requestor.instance.subject.instance.surname|default %}{{ requestor.instance.subject.instance.surname }}{% endif %}",
"betrokkeneIdentificatie._sourceId": "{% if requestor.reference|default %}{{ requestor.reference }}{% endif %}",
"betrokkeneIdentificatie.inpBsn": "{% if requestor.instance.subject.instance.personal_number|default %}{{ requestor.instance.subject.instance.personal_number }}{% endif %}",
"betrokkeneIdentificatie.inpA_nummer": "{% if requestor.instance.subject.instance.personal_number_a|default %}{{ requestor.instance.subject.instance.personal_number_a }}{% endif %}",
"betrokkeneIdentificatie.geslachtsnaam": "{% if requestor.instance.subject.instance.gender|default %}{{ requestor.instance.subject.instance.gender }}{% endif %}",
"betrokkeneIdentificatie.voorvoegselGeslachtsnaam": "{% if requestor.instance.subject.instance.prefix|default %}{{ requestor.instance.subject.instance.prefix }}{% endif %}",
"betrokkeneIdentificatie.voorletters": "{% if requestor.instance.subject.instance.initials|default %}{{ requestor.instance.subject.instance.initials }}{% endif %}",
"betrokkeneIdentificatie.voornamen": "{% if requestor.instance.subject.instance.first_names|default %}{{ requestor.instance.subject.instance.first_names }}{% endif %}",
"betrokkeneIdentificatie.geslachtsaanduiding": "{% if requestor.instance.subject.instance.geslachtsnaam|default %}{{ requestor.instance.subject.instance.geslachtsnaam }}{% endif %}",
"betrokkeneIdentificatie.geboortedatum": "{% if requestor.instance.subject.instance.date_of_birth|default %}{{ requestor.instance.subject.instance.date_of_birth }}{% endif %}",
"betrokkeneIdentificatie.achternaam": "{% if requestor.instance.subject.instance.surname|default %}{{ requestor.instance.subject.instance.surname }}{% endif %}",
"betrokkeneIdentificatie.verblijfsadres.wplWoonplaatsNaam": "{% if requestor.instance.subject.instance.address_residence.instance.city|default %}{{ requestor.instance.subject.instance.address_residence.instance.city }}{% endif %}",
"betrokkeneIdentificatie.verblijfsadres.aoaPostcode": "{% if requestor.instance.subject.instance.address_residence.instance.zipcode|default %}{{ requestor.instance.subject.instance.address_residence.instance.zipcode }}{% endif %}",
"betrokkeneIdentificatie.verblijfsadres.aoaHuisnummer": "{% if requestor.instance.subject.instance.address_residence.instance.street_number|default %}{{ requestor.instance.subject.instance.address_residence.instance.street_number }}{% endif %}",
"betrokkeneIdentificatie.verblijfsadres.aoaHuisletter": "{% if requestor.instance.subject.instance.address_residence.instance.street_number_letter|default %}{{ requestor.instance.subject.instance.address_residence.instance.street_number_letter }}{% endif %}",
"betrokkeneIdentificatie.verblijfsadres.aoaHuisnummertoevoeging": "{% if requestor.instance.subject.instance.address_residence.instance.street_number_suffix|default %}{{ requestor.instance.subject.instance.address_residence.instance.street_number_suffix }}{% endif %}",
"roltype": "{% if role.instance.name|default %}{% for roltype in roltypen %}{% if roltype.omschrijvingGeneriek|lower == role.instance.name|lower %}{{ roltype['_self']['id'] }}{% endif %}{% endfor %}{% endif %}"
},
"unset": [],
"cast": {
"roltype": "unsetIfValue==",
"betrokkeneIdentificatie": "unsetIfValue=="
},
"passTrough": false
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"name": "Xxllnc Value to ZGW ZaakEigenschap",
"version": "0.0.1",
"mapping": {
"naam": "{% if name|default %}{{ name }}{% endif %}",
"waarde": "{% if value[0]|default and value[0] is not iterable %}{{ value[0] }}{% elseif value[0][0]|default and value[0][0] is not iterable %}{{ value[0][0] }}{% elseif value[0][0][0]|default and value[0][0][0] is not iterable %}{{ value[0][0][0] }}{% else %}{{ value|json_encode}}{% endif %}",
"eigenschap": "{% for eigenschap in eigenschappen %}{% if eigenschap.naam == name %}{{ eigenschap['_self']['id'] }}{% endif %}{% endfor %}"
},
"unset": [],
"cast": [],
"passTrough": false
}
7 changes: 7 additions & 0 deletions configurations/xxllnc-zgw/sources/xxllnc-v1.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"name": "Xxllnc V1 API",
"version": "0.0.1",
"location": "",
"isEnabled": true,
"type": "api"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"name": "Xxllnc cases to ZGW zaken",
"description": "",
"version": "0.0.1",
"sourceId": "1",
"sourceType": "api",
"sourceHash": "",
"sourceHashMapping": "",
"sourceTargetMapping": "1",
"sourceConfig": {
"idPosition": "reference",
"resultsPosition": "result.instance.rows",
"endpoint": "\/case",
"query.zql": "select {} from case where case.casetype.id=",
"extraDataConfigs.0.staticEndpoint": "/case/{{ originId }}/document",
"extraDataConfigs.0.mergeExtraData": "true",
"extraDataConfigs.0.keyToSetExtraData": "documents",
"extraDataConfigs.1.staticEndpoint": "/casetype/{{ originId }}",
"extraDataConfigs.1.endpointIdLocation": "instance.casetype.reference",
"extraDataConfigs.1.mergeExtraData": "true",
"extraDataConfigs.1.keyToSetExtraData": "casetype"
},
"currentPage": 1,
"targetId": "1\/1",
"targetType": "register\/schema",
"targetHash": "",
"targetSourceMapping": "",
"targetConfig": [],
"followUps": []
}
Loading
Loading