diff --git a/configurations/sharepoint-woo/mappings/xxllnc-suite-to-publications.json b/configurations/sharepoint-woo/mappings/xxllnc-suite-to-publications.json new file mode 100644 index 0000000..17e38a8 --- /dev/null +++ b/configurations/sharepoint-woo/mappings/xxllnc-suite-to-publications.json @@ -0,0 +1,14 @@ +{ + "name": "Xxllnc suite to Publication", + "description": "", + "version": "", + "reference": "", + "mapping": { + "title": "omschrijving", + "summary": "statustoelichting", + "description": "statusomschrijving" + }, + "unset": [], + "cast": [], + "passThrough": false +} \ No newline at end of file diff --git a/configurations/sharepoint-woo/sources/xxllnc-suite.json b/configurations/sharepoint-woo/sources/xxllnc-suite.json new file mode 100644 index 0000000..ba40f10 --- /dev/null +++ b/configurations/sharepoint-woo/sources/xxllnc-suite.json @@ -0,0 +1,20 @@ +{ + "name": "Xxllnc suite API", + "description": "Xxllnc suite API", + "reference": null, + "version": "0.0.0", + "location": "", + "isEnabled": true, + "type": "api", + "authorizationHeader": null, + "auth": "none", + "authorizationPassthroughMethod": "header", + "authenticationConfig": [], + "configuration": { + "auth.0": "username", + "auth.1": "password" + }, + "logRetention": 3600, + "errorRetention": 86400, + "test": false +} \ No newline at end of file diff --git a/configurations/sharepoint-woo/synchronizations/xxllnc-suite-to-publications.json b/configurations/sharepoint-woo/synchronizations/xxllnc-suite-to-publications.json new file mode 100644 index 0000000..6dfedf8 --- /dev/null +++ b/configurations/sharepoint-woo/synchronizations/xxllnc-suite-to-publications.json @@ -0,0 +1,19 @@ +{ + "name": "Xxllnc suite to Publications", + "description": "", + "version": "0.0.1", + "sourceId": "1", + "sourceType": "api", + "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" + }, + "targetId": "1/1", + "targetType": "register/schema" +} \ No newline at end of file diff --git a/lib/Service/CallService.php b/lib/Service/CallService.php index 55559fd..b86d184 100644 --- a/lib/Service/CallService.php +++ b/lib/Service/CallService.php @@ -356,7 +356,7 @@ private function sourceRateLimit(Source $source, array $headers): array * * @return array The updated config array. */ - private function applyConfigDot(array $config): array + public function applyConfigDot(array $config): array { $dotConfig = new Dot($config); $unsetKeys = []; diff --git a/lib/Service/SynchronizationService.php b/lib/Service/SynchronizationService.php index bddba5f..8f88250 100644 --- a/lib/Service/SynchronizationService.php +++ b/lib/Service/SynchronizationService.php @@ -431,7 +431,7 @@ public function getAllObjectsFromApi(Synchronization $synchronization, ?bool $is $source = $this->sourceMapper->find(id: $synchronization->getSourceId()); // Lets get the source config - $sourceConfig = $synchronization->getSourceConfig(); + $sourceConfig = $this->callService->applyConfigDot($synchronization->getSourceConfig()); $endpoint = $sourceConfig['endpoint'] ?? ''; $headers = $sourceConfig['headers'] ?? []; $query = $sourceConfig['query'] ?? [];