diff --git a/configurations/sharepoint-woo/mappings/sharepoint-woo-verzoek-to-publications.json b/configurations/sharepoint-woo/mappings/sharepoint-woo-verzoek-to-publications.json index e74ad30..cd7743b 100644 --- a/configurations/sharepoint-woo/mappings/sharepoint-woo-verzoek-to-publications.json +++ b/configurations/sharepoint-woo/mappings/sharepoint-woo-verzoek-to-publications.json @@ -8,16 +8,18 @@ "summary": "d.woo_x005f_samenvatting", "category": "d.woo_x005f_categorie", "published": "d.woo_x005f_publicatiedatum", - "modified": "d.vti_x005f_nexttolasttimemodified" - }, - "unset": [], - "cast": { - "title": "d.woo_x005f_titel", - "description": "d.woo_x005f_beschrijving", - "summary": "d.woo_x005f_samenvatting", - "category": "d.woo_x005f_categorie", - "published": "d.woo_x005f_publicatiedatum", - "modified": "d.vti_x005f_nexttolasttimemodified" + "modified": "d.vti_x005f_nexttolasttimemodified", + "attachments": "{{ '[' }}{% if fileUrls['d']['results']|default %}{% set index = 0 %}{% for file in fileUrls['d']['results'] %}{% if index > 0 %}{{ ', ' }}{% endif %}{{ '{' }}{% set uri = file['__metadata']['uri']~'/$value' %}{{ '\"downloadUrl\": \"'~uri~'\",\"source\": \"1\"' }}{{ '}' }}{% endfor %}{% endif %}{{ ']' }}" + }, + "unset": [], + "cast": { + "title": "unsetIfValue==d.woo_x005f_titel", + "description": "unsetIfValue==d.woo_x005f_beschrijving", + "summary": "unsetIfValue==d.woo_x005f_samenvatting", + "category": "unsetIfValue==d.woo_x005f_categorie", + "published": "unsetIfValue==d.woo_x005f_publicatiedatum", + "modified": "unsetIfValue==d.vti_x005f_nexttolasttimemodified", + "attachments": "jsonToArray" }, "passThrough": false } \ No newline at end of file diff --git a/configurations/sharepoint-woo/synchronizations/sharepoint-convenanten-to-publications.json b/configurations/sharepoint-woo/synchronizations/sharepoint-convenanten-to-publications.json index bc53941..030054f 100644 --- a/configurations/sharepoint-woo/synchronizations/sharepoint-convenanten-to-publications.json +++ b/configurations/sharepoint-woo/synchronizations/sharepoint-convenanten-to-publications.json @@ -7,14 +7,17 @@ "sourceHash": "", "sourceTargetMapping": "1", "sourceConfig": { - "idPosition": "Properties.__deferred.uri", - "resultsPosition": "d.results", - "endpoint": "/Web/GetFolderByServerRelativePath(decodedurl='/WOO/Convenanten')/folders", - "singleEndpoint": "{{ originId }}", - "mergeDataSingleEndpoint": true, - "headers": [], - "query": [] - }, + "idPosition": "UniqueId", + "resultsPosition": "d.results", + "endpoint": "\/Web\/GetFolderByServerRelativePath(decodedurl='\/WOO\/Convenanten')\/folders", + "extraDataConfigs.0.dynamicEndpointLocation": "Properties.__deferred.uri", + "extraDataConfigs.0.mergeExtraData": "true", + "extraDataConfigs.1.dynamicEndpointLocation": "Files.__deferred.uri", + "extraDataConfigs.1.mergeExtraData": "true", + "extraDataConfigs.1.keyToSetExtraData": "fileUrls", + "headers": [], + "query": [] + }, "targetId": "1/1", "targetType": "register/schema" } \ No newline at end of file diff --git a/configurations/sharepoint-woo/synchronizations/sharepoint-woo-verzoeken-to-publications.json b/configurations/sharepoint-woo/synchronizations/sharepoint-woo-verzoeken-to-publications.json index f7f3e47..e4c6696 100644 --- a/configurations/sharepoint-woo/synchronizations/sharepoint-woo-verzoeken-to-publications.json +++ b/configurations/sharepoint-woo/synchronizations/sharepoint-woo-verzoeken-to-publications.json @@ -7,13 +7,16 @@ "sourceHash": "", "sourceTargetMapping": "1", "sourceConfig": { - "idPosition": "Properties.__deferred.uri", + "idPosition": "UniqueId", "resultsPosition": "d.results", "endpoint": "/Web/GetFolderByServerRelativePath(decodedurl='/WOO/Woo-verzoeken en -besluiten')/folders", - "singleEndpoint": "{{ originId }}", - "mergeDataSingleEndpoint": true, - "headers": [], - "query": [] + "extraDataConfigs.0.dynamicEndpointLocation": "Properties.__deferred.uri", + "extraDataConfigs.0.mergeExtraData": "true", + "extraDataConfigs.1.dynamicEndpointLocation": "Files.__deferred.uri", + "extraDataConfigs.1.mergeExtraData": "true", + "extraDataConfigs.1.keyToSetExtraData": "fileUrls", + "headers": [], + "query": [] }, "targetId": "1/1", "targetType": "register/schema"