Skip to content

Commit

Permalink
Update config and docblock
Browse files Browse the repository at this point in the history
  • Loading branch information
bbrands02 committed Dec 5, 2024
1 parent 45889f5 commit fdc12e8
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,25 @@
"version": "",
"reference": "",
"mapping": {
"title": "omschrijving",
"summary": "zaaktypeomschrijving",
"description": "zaaktypeomschrijving",
"published" : "",
"modified" : "{{ 'now'|date(H:i:sTm-d-Y') }}",
"status": "Concept",
"catalog": "",
"publicationType": ""
},
"unset": [],
"cast": {
"title": "unsetIfValue==omschrijving",
"summary": "unsetIfValue==zaaktypeomschrijving",
"description": "unsetIfValue==zaaktypeomschrijving",
"published" : "unsetIfValue==",
"catalog": "unsetIfValue==",
"publicationType": "unsetIfValue=="
"title": "omschrijving",
"summary": "zaaktypeomschrijving",
"description": "zaaktypeomschrijving",
"category": "{% if zaaktypecode|default %}{% set wooVerzoekenEnBesluiten = ['LP00000431', 'B1873', 'cherry'] %}{% set klachtoordelen = ['LP00000091', 'LP00001132', 'LP00000121', 'B0757', 'LP00000832', 'LP00001096'] %}{% if zaaktypecode in wooVerzoekenEnBesluiten %}{{ 'Woo-verzoeken en -besluiten' }}{% elseif zaaktypecode in klachtoordelen %}{{ 'Klachtoordelen' }}{% endif %}{% endif %}",
"published": "startdatum",
"modified": "{{ 'now'|date('H:i:sTm-d-Y') }}",
"attachments": "[{% if files|default %}{% for file in files %} { {% if file['titel']|default %}\"title\": \"{{ file['titel'] }}\",{% endif %}\"labels\": [\"{{ 'Informatieverzoek' }}\"],{% if file['formaat']|default %}\"extension\": \"{{ file['formaat']|split('/')|last }}\",\"type\": \"{{ file['formaat'] }}\",{% endif %}{% if file['inhoud']|default and file['formaat']|default %}\"accessUrl\": \"data:{{ file['formaat'] }};base64,{{ file.inhoud }}\"{% endif %} }{{ loop.last ? '' : ',' }} {% endfor %}{% endif %}]",
"status": "Concept"
},
"unset": [
""
],
"cast": {
"title": "unsetIfValue==omschrijving",
"summary": "unsetIfValue==zaaktypeomschrijving",
"description": "unsetIfValue==zaaktypeomschrijving",
"category": "unsetIfValue==",
"published": "unsetIfValue==startdatum",
"attachments": "jsonToArray"
},
"passThrough": false
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,19 @@
"sourceHash": "",
"sourceTargetMapping": "1",
"sourceConfig": {
"idPosition": "id",
"resultsPosition": "results",
"endpoint": "/tlb/zaaksysteem/api/v1/zaken",
"headers": [],
"query.startdatum__gte": "2024-07-06",
"query.einddatum__lt": "2024-08-01"
},
"idPosition": "identificatie",
"resultsPosition": "results",
"endpoint": "\/tlb\/zaaksysteem\/api\/v1\/zaken",
"headers": [],
"query.startdatum__gte": "2024-08-01",
"query.einddatum__lt": "2025-01-01",
"usesPagination": "false",
"extraDataConfigs.0.staticEndpoint": "/tlb/zaaksysteem/api/v1/zaken/{{ originId }}/informatieobjecten",
"extraDataConfigs.0.mergeExtraData": "true",
"extraDataConfigs.0.keyToSetExtraData": "files",
"extraDataConfigs.0.resultsLocation": "results",
"extraDataConfigs.0.extraDataConfigPerResult.staticEndpoint": "/tlb/zaaksysteem/api/v1/informatieobjecten/{{ originId }}"
},
"targetId": "1/1",
"targetType": "register/schema"
}
5 changes: 5 additions & 0 deletions lib/Db/Synchronization.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,11 @@ public function __construct() {
$this->addType(fieldName:'followUps', type: 'json');
}

/**
* Checks through sourceConfig if the source of this sync uses pagination
*
* @return bool true if its uses pagination
*/
public function usesPagination(): bool
{
if (isset($this->sourceConfig['usesPagination']) === true && ($this->sourceConfig['usesPagination'] === false || $this->sourceConfig['usesPagination'] === 'false')) {
Expand Down

0 comments on commit fdc12e8

Please sign in to comment.