From 90a7db6412f7a9ce6a22690114c25bc6709c2e25 Mon Sep 17 00:00:00 2001 From: Roy <> Date: Fri, 22 Aug 2025 08:21:55 +0000 Subject: [PATCH] rabk added in aspects --- .../directus/sync/collections/operations.json | 648 +++++++++++++++++- .../sync/collections/permissions.json | 364 +++------- echo/directus/sync/collections/policies.json | 19 +- .../sync/snapshot/fields/aspect/rank.json | 43 ++ 4 files changed, 779 insertions(+), 295 deletions(-) create mode 100644 echo/directus/sync/snapshot/fields/aspect/rank.json diff --git a/echo/directus/sync/collections/operations.json b/echo/directus/sync/collections/operations.json index d0d8f621..e52e78d0 100644 --- a/echo/directus/sync/collections/operations.json +++ b/echo/directus/sync/collections/operations.json @@ -39,6 +39,46 @@ "flow": "17703446-fef0-49e9-bdc4-385db1311137", "_syncId": "af7a671d-78fa-4d07-adad-c3bfabc4617c" }, + { + "name": "Check Language", + "key": "check_language", + "type": "condition", + "position_x": 20, + "position_y": 1, + "options": { + "filter": { + "$trigger": { + "language": { + "_eq": "en" + } + } + } + }, + "resolve": "528ddb67-1a33-459b-88ac-e9851adfa470", + "reject": "b86ed989-2b09-42fe-bc19-fb5bc1f4cd8b", + "flow": "17703446-fef0-49e9-bdc4-385db1311137", + "_syncId": "8a2cc38e-443a-41a2-a7e3-9dd7bbdabbe8" + }, + { + "name": "Check Language", + "key": "check_language", + "type": "condition", + "position_x": 20, + "position_y": 1, + "options": { + "filter": { + "$trigger": { + "language": { + "_eq": "en" + } + } + } + }, + "resolve": "922d6207-d0da-41d4-b7b2-4c570b13c19b", + "reject": "71355a51-3678-4f5a-9701-b527d5b5a4f1", + "flow": "17703446-fef0-49e9-bdc4-385db1311137", + "_syncId": "c3f2d50b-7592-47d2-8c7c-1556788078c2" + }, { "name": "Check Report Language", "key": "check_report_language", @@ -91,6 +131,58 @@ "flow": "ec4e7ea5-72de-4365-b66f-d8f11b549495", "_syncId": "c5d2aff3-1a1a-4ea2-8e39-5189409b7dc1" }, + { + "name": "Check Report Language", + "key": "check_report_language", + "type": "item-read", + "position_x": 73, + "position_y": 1, + "options": { + "query": { + "filter": { + "project_id": { + "id": { + "_eq": "{{$trigger.payload.project_id.id}}" + } + } + }, + "fields": [ + "language" + ] + }, + "collection": "project_report" + }, + "resolve": "e598fa14-52fb-4741-86f7-468801c440c0", + "reject": null, + "flow": "ec4e7ea5-72de-4365-b66f-d8f11b549495", + "_syncId": "7d3f7cd6-a02e-4593-8073-6297fb9b5ca6" + }, + { + "name": "Check Report Language", + "key": "check_report_language", + "type": "item-read", + "position_x": 73, + "position_y": 1, + "options": { + "query": { + "filter": { + "project_id": { + "id": { + "_eq": "{{$trigger.payload.project_id.id}}" + } + } + }, + "fields": [ + "language" + ] + }, + "collection": "project_report" + }, + "resolve": "dfb45a27-c2d3-4252-ab46-55bac06a7c71", + "reject": null, + "flow": "ec4e7ea5-72de-4365-b66f-d8f11b549495", + "_syncId": "48272b58-223e-4260-b6a4-c35e37a55b02" + }, { "name": "Dutch", "key": "dutch", @@ -131,6 +223,74 @@ "flow": "17703446-fef0-49e9-bdc4-385db1311137", "_syncId": "4795cc24-3f3c-4be9-9844-24552da522fa" }, + { + "name": "Dutch", + "key": "dutch", + "type": "condition", + "position_x": 20, + "position_y": 20, + "options": { + "filter": { + "$trigger": { + "language": { + "_eq": "nl" + } + } + } + }, + "resolve": "18b93ae9-dfe9-48b6-ba8d-f687316fe3ec", + "reject": "4fe0cf69-952b-4134-bfce-a7d783ecd335", + "flow": "17703446-fef0-49e9-bdc4-385db1311137", + "_syncId": "71355a51-3678-4f5a-9701-b527d5b5a4f1" + }, + { + "name": "Dutch", + "key": "dutch", + "type": "condition", + "position_x": 20, + "position_y": 20, + "options": { + "filter": { + "$trigger": { + "language": { + "_eq": "nl" + } + } + } + }, + "resolve": "07c4b2dd-2e0b-4119-b444-d51c1609e08f", + "reject": "a5c042e9-c72f-4190-aeb2-1465381bc4ce", + "flow": "17703446-fef0-49e9-bdc4-385db1311137", + "_syncId": "b86ed989-2b09-42fe-bc19-fb5bc1f4cd8b" + }, + { + "name": "Email Send Operation Failed", + "key": "email_send_operation_failed", + "type": "log", + "position_x": 58, + "position_y": 1, + "options": { + "message": "An email could not be sent due to some error: {{$last}}" + }, + "resolve": null, + "reject": null, + "flow": "17703446-fef0-49e9-bdc4-385db1311137", + "_syncId": "a8493bf0-851d-443c-b8ed-1d38d79e5645" + }, + { + "name": "Email Send Operation Failed", + "key": "email_send_operation_failed", + "type": "log", + "position_x": 58, + "position_y": 1, + "options": { + "message": "An email could not be sent due to some error: {{$last}}" + }, + "resolve": null, + "reject": null, + "flow": "17703446-fef0-49e9-bdc4-385db1311137", + "_syncId": "b4f25f50-6308-4992-ad55-b17f723b8d0d" + }, { "name": "Email Send Operation Failed", "key": "email_send_operation_failed", @@ -159,6 +319,34 @@ "flow": "17703446-fef0-49e9-bdc4-385db1311137", "_syncId": "2b24450b-6a2e-4452-aba1-9814d17fef42" }, + { + "name": "Email Send Operation Failed Dutch", + "key": "email_send_operation_failed_dutch", + "type": "log", + "position_x": 58, + "position_y": 20, + "options": { + "message": "An email could not be sent due to some error: {{$last}}" + }, + "resolve": null, + "reject": null, + "flow": "17703446-fef0-49e9-bdc4-385db1311137", + "_syncId": "615a54cd-a72e-41ad-9403-9577c80280d6" + }, + { + "name": "Email Send Operation Failed Dutch", + "key": "email_send_operation_failed_dutch", + "type": "log", + "position_x": 58, + "position_y": 20, + "options": { + "message": "An email could not be sent due to some error: {{$last}}" + }, + "resolve": null, + "reject": null, + "flow": "17703446-fef0-49e9-bdc4-385db1311137", + "_syncId": "71dab14d-c09b-4ee3-802c-55ac4dea1efc" + }, { "name": "Email Send Operation Failed Dutch", "key": "email_send_operation_failed_dutch", @@ -185,7 +373,35 @@ "resolve": null, "reject": null, "flow": "17703446-fef0-49e9-bdc4-385db1311137", - "_syncId": "615a54cd-a72e-41ad-9403-9577c80280d6" + "_syncId": "a9e2f5a0-2004-4161-a624-5fa0404a7ed9" + }, + { + "name": "failed", + "key": "failed", + "type": "log", + "position_x": 20, + "position_y": 39, + "options": { + "message": "language detection failed" + }, + "resolve": null, + "reject": null, + "flow": "17703446-fef0-49e9-bdc4-385db1311137", + "_syncId": "4fe0cf69-952b-4134-bfce-a7d783ecd335" + }, + { + "name": "failed", + "key": "failed", + "type": "log", + "position_x": 20, + "position_y": 39, + "options": { + "message": "language detection failed" + }, + "resolve": null, + "reject": null, + "flow": "17703446-fef0-49e9-bdc4-385db1311137", + "_syncId": "a5c042e9-c72f-4190-aeb2-1465381bc4ce" }, { "name": "failed", @@ -224,10 +440,10 @@ "options": { "code": "module.exports = async function(data) {\n\n const submissions = data.get_all_participants;\n \n // Filter submissions to only include those where email_opt_in is true\n const filteredSubmissions = submissions.filter(sub => sub.email_opt_in === true);\n\n // Create an array with email, project_id and an email_opt_out token for each submission\n const result = filteredSubmissions.map(sub => ({\n project_name: data.project_data[0].name || '',\n\t\tdefault_conversation_title: data.project_data[0].default_conversation_title || '',\n\t\tconversation_name: sub.conversation_id.participant_name || '',\n email: sub.email,\n project_id: sub.project_id || '',\n token: sub.email_opt_out_token,\n language: data.check_report_language[0].language || 'empty',\n ADMIN_BASE_URL: \"{{ $env.ADMIN_BASE_URL }}\" || \"http://localhost:5173\",\n PARTICIPANT_BASE_URL: \"{{ $env.PARTICIPANT_BASE_URL }}\" || \"http://localhost:5174\", \n }));\n \n return result;\n};" }, - "resolve": "e101f00d-2fb8-4f40-9e0e-4d24da5bb1e9", + "resolve": "b8144cee-59f6-40d9-a849-dd0c639e4e31", "reject": null, "flow": "ec4e7ea5-72de-4365-b66f-d8f11b549495", - "_syncId": "efb3982e-5703-4c07-8982-a6e1b5218e4a" + "_syncId": "ca1ffbc5-cfce-4fb4-8f15-c128ea407d41" }, { "name": "Filter Emails", @@ -238,10 +454,92 @@ "options": { "code": "module.exports = async function(data) {\n\n const submissions = data.get_all_participants;\n \n // Filter submissions to only include those where email_opt_in is true\n const filteredSubmissions = submissions.filter(sub => sub.email_opt_in === true);\n\n // Create an array with email, project_id and an email_opt_out token for each submission\n const result = filteredSubmissions.map(sub => ({\n project_name: data.project_data[0].name || '',\n\t\tdefault_conversation_title: data.project_data[0].default_conversation_title || '',\n\t\tconversation_name: sub.conversation_id.participant_name || '',\n email: sub.email,\n project_id: sub.project_id || '',\n token: sub.email_opt_out_token,\n language: data.check_report_language[0].language || 'empty',\n ADMIN_BASE_URL: \"{{ $env.ADMIN_BASE_URL }}\" || \"http://localhost:5173\",\n PARTICIPANT_BASE_URL: \"{{ $env.PARTICIPANT_BASE_URL }}\" || \"http://localhost:5174\", \n }));\n \n return result;\n};" }, - "resolve": "b8144cee-59f6-40d9-a849-dd0c639e4e31", + "resolve": "64108c9f-d6bb-4141-8f9c-b023ff5d7549", "reject": null, "flow": "ec4e7ea5-72de-4365-b66f-d8f11b549495", - "_syncId": "ca1ffbc5-cfce-4fb4-8f15-c128ea407d41" + "_syncId": "dfb45a27-c2d3-4252-ab46-55bac06a7c71" + }, + { + "name": "Filter Emails", + "key": "filter_emails", + "type": "exec", + "position_x": 91, + "position_y": 1, + "options": { + "code": "module.exports = async function(data) {\n\n const submissions = data.get_all_participants;\n \n // Filter submissions to only include those where email_opt_in is true\n const filteredSubmissions = submissions.filter(sub => sub.email_opt_in === true);\n\n // Create an array with email, project_id and an email_opt_out token for each submission\n const result = filteredSubmissions.map(sub => ({\n project_name: data.project_data[0].name || '',\n\t\tdefault_conversation_title: data.project_data[0].default_conversation_title || '',\n\t\tconversation_name: sub.conversation_id.participant_name || '',\n email: sub.email,\n project_id: sub.project_id || '',\n token: sub.email_opt_out_token,\n language: data.check_report_language[0].language || 'empty',\n ADMIN_BASE_URL: \"{{ $env.ADMIN_BASE_URL }}\" || \"http://localhost:5173\",\n PARTICIPANT_BASE_URL: \"{{ $env.PARTICIPANT_BASE_URL }}\" || \"http://localhost:5174\", \n }));\n \n return result;\n};" + }, + "resolve": "18df11f6-d6d9-41f4-be23-4a759620864c", + "reject": null, + "flow": "ec4e7ea5-72de-4365-b66f-d8f11b549495", + "_syncId": "e598fa14-52fb-4741-86f7-468801c440c0" + }, + { + "name": "Filter Emails", + "key": "filter_emails", + "type": "exec", + "position_x": 91, + "position_y": 1, + "options": { + "code": "module.exports = async function(data) {\n\n const submissions = data.get_all_participants;\n \n // Filter submissions to only include those where email_opt_in is true\n const filteredSubmissions = submissions.filter(sub => sub.email_opt_in === true);\n\n // Create an array with email, project_id and an email_opt_out token for each submission\n const result = filteredSubmissions.map(sub => ({\n project_name: data.project_data[0].name || '',\n\t\tdefault_conversation_title: data.project_data[0].default_conversation_title || '',\n\t\tconversation_name: sub.conversation_id.participant_name || '',\n email: sub.email,\n project_id: sub.project_id || '',\n token: sub.email_opt_out_token,\n language: data.check_report_language[0].language || 'empty',\n ADMIN_BASE_URL: \"{{ $env.ADMIN_BASE_URL }}\" || \"http://localhost:5173\",\n PARTICIPANT_BASE_URL: \"{{ $env.PARTICIPANT_BASE_URL }}\" || \"http://localhost:5174\", \n }));\n \n return result;\n};" + }, + "resolve": "e101f00d-2fb8-4f40-9e0e-4d24da5bb1e9", + "reject": null, + "flow": "ec4e7ea5-72de-4365-b66f-d8f11b549495", + "_syncId": "efb3982e-5703-4c07-8982-a6e1b5218e4a" + }, + { + "name": "Get All Participants", + "key": "get_all_participants", + "type": "item-read", + "position_x": 55, + "position_y": 1, + "options": { + "query": { + "filter": { + "project_id": { + "id": { + "_eq": "{{$trigger.payload.project_id}}" + } + } + }, + "fields": [ + "*", + "conversation_id.participant_name" + ] + }, + "collection": "project_report_notification_participants" + }, + "resolve": "d154ee34-0931-43f3-aaca-9168f88fa04b", + "reject": null, + "flow": "ec4e7ea5-72de-4365-b66f-d8f11b549495", + "_syncId": "107ebc18-7d2d-4299-9d98-b7d1e7322b7c" + }, + { + "name": "Get All Participants", + "key": "get_all_participants", + "type": "item-read", + "position_x": 55, + "position_y": 1, + "options": { + "query": { + "filter": { + "project_id": { + "id": { + "_eq": "{{$trigger.payload.project_id}}" + } + } + }, + "fields": [ + "*", + "conversation_id.participant_name" + ] + }, + "collection": "project_report_notification_participants" + }, + "resolve": "7d3f7cd6-a02e-4593-8073-6297fb9b5ca6", + "reject": null, + "flow": "ec4e7ea5-72de-4365-b66f-d8f11b549495", + "_syncId": "e219d427-fe53-4f95-8c03-70b305ee92c0" }, { "name": "Get All Participants", @@ -292,10 +590,24 @@ }, "collection": "project_report_notification_participants" }, - "resolve": "d154ee34-0931-43f3-aaca-9168f88fa04b", + "resolve": "48272b58-223e-4260-b6a4-c35e37a55b02", "reject": null, "flow": "ec4e7ea5-72de-4365-b66f-d8f11b549495", - "_syncId": "107ebc18-7d2d-4299-9d98-b7d1e7322b7c" + "_syncId": "c37ec6cb-c7f1-4be5-8bec-4d4fd49cc966" + }, + { + "name": "log environment vars", + "key": "log_environment_vars", + "type": "log", + "position_x": 127, + "position_y": 1, + "options": { + "message": "{{data['$env']}} {{data.$env}} {{process.env}} {{$env}} {{$env.PARTICIPANT_BASE_URL}}" + }, + "resolve": null, + "reject": null, + "flow": "ec4e7ea5-72de-4365-b66f-d8f11b549495", + "_syncId": "7161e52e-b1cc-4c13-bedd-a9d64527026f" }, { "name": "log environment vars", @@ -306,24 +618,82 @@ "options": { "message": "{{data['$env']}} {{data.$env}} {{process.env}} {{$env}} {{$env.PARTICIPANT_BASE_URL}}" }, - "resolve": null, - "reject": null, + "resolve": null, + "reject": null, + "flow": "ec4e7ea5-72de-4365-b66f-d8f11b549495", + "_syncId": "d82482db-cab4-43f0-b434-e5e6e5b73188" + }, + { + "name": "log environment vars", + "key": "log_environment_vars", + "type": "log", + "position_x": 127, + "position_y": 1, + "options": { + "message": "{{data['$env']}} {{data.$env}} {{process.env}} {{$env}} {{$env.PARTICIPANT_BASE_URL}}" + }, + "resolve": null, + "reject": null, + "flow": "ec4e7ea5-72de-4365-b66f-d8f11b549495", + "_syncId": "da5f4cce-eff0-426d-a207-d61366899d1f" + }, + { + "name": "log environment vars", + "key": "log_environment_vars", + "type": "log", + "position_x": 127, + "position_y": 1, + "options": { + "message": "{{data['$env']}} {{data.$env}} {{process.env}} {{$env}} {{$env.PARTICIPANT_BASE_URL}}" + }, + "resolve": null, + "reject": null, + "flow": "ec4e7ea5-72de-4365-b66f-d8f11b549495", + "_syncId": "3dc611dc-7d1d-47dd-bd47-bd47e7e0326c" + }, + { + "name": "PROCEED_ONLY_IF \"published\" in payload", + "key": "proceed_only_if_published_in_payload", + "type": "condition", + "position_x": 19, + "position_y": 1, + "options": { + "filter": { + "$trigger": { + "payload": { + "status": { + "_eq": "published" + } + } + } + } + }, + "resolve": "ea051ae4-776f-490b-8b02-eaf4099243ef", + "reject": "84852456-3f3a-4906-be94-8b750159883b", "flow": "ec4e7ea5-72de-4365-b66f-d8f11b549495", - "_syncId": "7161e52e-b1cc-4c13-bedd-a9d64527026f" + "_syncId": "239c6fea-242d-4b7d-b854-c99d2fe43cf3" }, { - "name": "log environment vars", - "key": "log_environment_vars", - "type": "log", - "position_x": 127, + "name": "PROCEED_ONLY_IF \"published\" in payload", + "key": "proceed_only_if_published_in_payload", + "type": "condition", + "position_x": 19, "position_y": 1, "options": { - "message": "{{data['$env']}} {{data.$env}} {{process.env}} {{$env}} {{$env.PARTICIPANT_BASE_URL}}" + "filter": { + "$trigger": { + "payload": { + "status": { + "_eq": "published" + } + } + } + } }, - "resolve": null, - "reject": null, + "resolve": "994ec698-46e4-4f69-bf44-d1ed1c820ccc", + "reject": "40e7af64-55e2-4a84-ad35-18002ead367f", "flow": "ec4e7ea5-72de-4365-b66f-d8f11b549495", - "_syncId": "da5f4cce-eff0-426d-a207-d61366899d1f" + "_syncId": "0f470d6b-2aef-4f50-913e-45cda36cb121" }, { "name": "PROCEED_ONLY_IF \"published\" in payload", @@ -342,10 +712,10 @@ } } }, - "resolve": "ea051ae4-776f-490b-8b02-eaf4099243ef", - "reject": "84852456-3f3a-4906-be94-8b750159883b", + "resolve": "3f3aa09e-9a47-4684-8559-50f2a5b3e7a7", + "reject": "5d4b1b90-48f6-468b-a019-a1a9fc45653a", "flow": "ec4e7ea5-72de-4365-b66f-d8f11b549495", - "_syncId": "239c6fea-242d-4b7d-b854-c99d2fe43cf3" + "_syncId": "c0ad54a5-9de0-4d36-bff5-d901d5bf2cd5" }, { "name": "PROCEED_ONLY_IF \"published\" in payload", @@ -369,6 +739,52 @@ "flow": "ec4e7ea5-72de-4365-b66f-d8f11b549495", "_syncId": "2784a141-2ae3-48d1-aedf-57c0be3bcc74" }, + { + "name": "Project Data", + "key": "project_data", + "type": "item-read", + "position_x": 37, + "position_y": 1, + "options": { + "collection": "project", + "query": { + "filter": { + "id": { + "id": { + "_eq": "{{$trigger.payload.project_id}}" + } + } + } + } + }, + "resolve": "47f1463c-3cb6-4420-a50e-92938fed3197", + "reject": null, + "flow": "ec4e7ea5-72de-4365-b66f-d8f11b549495", + "_syncId": "d8554457-95b6-474f-ba67-dfd5f936d575" + }, + { + "name": "Project Data", + "key": "project_data", + "type": "item-read", + "position_x": 37, + "position_y": 1, + "options": { + "collection": "project", + "query": { + "filter": { + "id": { + "id": { + "_eq": "{{$trigger.payload.project_id}}" + } + } + } + } + }, + "resolve": "c37ec6cb-c7f1-4be5-8bec-4d4fd49cc966", + "reject": null, + "flow": "ec4e7ea5-72de-4365-b66f-d8f11b549495", + "_syncId": "994ec698-46e4-4f69-bf44-d1ed1c820ccc" + }, { "name": "Project Data", "key": "project_data", @@ -410,10 +826,10 @@ } } }, - "resolve": "47f1463c-3cb6-4420-a50e-92938fed3197", + "resolve": "e219d427-fe53-4f95-8c03-70b305ee92c0", "reject": null, "flow": "ec4e7ea5-72de-4365-b66f-d8f11b549495", - "_syncId": "d8554457-95b6-474f-ba67-dfd5f936d575" + "_syncId": "3f3aa09e-9a47-4684-8559-50f2a5b3e7a7" }, { "name": "Report Not Published", @@ -427,7 +843,21 @@ "resolve": null, "reject": null, "flow": "ec4e7ea5-72de-4365-b66f-d8f11b549495", - "_syncId": "e8274ad4-5844-42cd-8a6b-d40d08cf83d3" + "_syncId": "40e7af64-55e2-4a84-ad35-18002ead367f" + }, + { + "name": "Report Not Published", + "key": "report_not_published", + "type": "log", + "position_x": 19, + "position_y": 19, + "options": { + "message": "The report is not yet published" + }, + "resolve": null, + "reject": null, + "flow": "ec4e7ea5-72de-4365-b66f-d8f11b549495", + "_syncId": "5d4b1b90-48f6-468b-a019-a1a9fc45653a" }, { "name": "Report Not Published", @@ -443,6 +873,20 @@ "flow": "ec4e7ea5-72de-4365-b66f-d8f11b549495", "_syncId": "84852456-3f3a-4906-be94-8b750159883b" }, + { + "name": "Report Not Published", + "key": "report_not_published", + "type": "log", + "position_x": 19, + "position_y": 19, + "options": { + "message": "The report is not yet published" + }, + "resolve": null, + "reject": null, + "flow": "ec4e7ea5-72de-4365-b66f-d8f11b549495", + "_syncId": "e8274ad4-5844-42cd-8a6b-d40d08cf83d3" + }, { "name": "Send Email Dutch", "key": "send_email_dutch", @@ -474,6 +918,68 @@ "flow": "17703446-fef0-49e9-bdc4-385db1311137", "_syncId": "ea78ec02-364d-4f18-80f8-ea5ac4c787ed" }, + { + "name": "Send Email Dutch", + "key": "send_email_dutch", + "type": "mail", + "position_x": 39, + "position_y": 20, + "options": { + "to": [ + "{{$trigger.email}}" + ], + "type": "template", + "subject": "Er is een rapport klaar met uw inbreng", + "body": null, + "data": { + "PARTICIPANT_BASE_URL": "{{$trigger.PARTICIPANT_BASE_URL}}", + "project_id": "{{$trigger.project_id}}", + "project_name": "{{$trigger.project_name}}", + "default_conversation_title": "{{$trigger.default_conversation_title}}", + "conversation_name": "{{$trigger.conversation_name}}", + "token": "{{$trigger.token}}" + }, + "template": "report-notification-nl", + "replyTo": [ + "info@dembrane.com" + ] + }, + "resolve": null, + "reject": "a9e2f5a0-2004-4161-a624-5fa0404a7ed9", + "flow": "17703446-fef0-49e9-bdc4-385db1311137", + "_syncId": "07c4b2dd-2e0b-4119-b444-d51c1609e08f" + }, + { + "name": "Send Email Dutch", + "key": "send_email_dutch", + "type": "mail", + "position_x": 39, + "position_y": 20, + "options": { + "to": [ + "{{$trigger.email}}" + ], + "type": "template", + "subject": "Er is een rapport klaar met uw inbreng", + "body": null, + "data": { + "PARTICIPANT_BASE_URL": "{{$trigger.PARTICIPANT_BASE_URL}}", + "project_id": "{{$trigger.project_id}}", + "project_name": "{{$trigger.project_name}}", + "default_conversation_title": "{{$trigger.default_conversation_title}}", + "conversation_name": "{{$trigger.conversation_name}}", + "token": "{{$trigger.token}}" + }, + "template": "report-notification-nl", + "replyTo": [ + "info@dembrane.com" + ] + }, + "resolve": null, + "reject": "71dab14d-c09b-4ee3-802c-55ac4dea1efc", + "flow": "17703446-fef0-49e9-bdc4-385db1311137", + "_syncId": "18b93ae9-dfe9-48b6-ba8d-f687316fe3ec" + }, { "name": "Send Email Dutch", "key": "send_email_dutch", @@ -505,6 +1011,37 @@ "flow": "17703446-fef0-49e9-bdc4-385db1311137", "_syncId": "34fb6ee5-2813-484a-a1cc-f97de097509b" }, + { + "name": "Send Email English", + "key": "send_email_english", + "type": "mail", + "position_x": 39, + "position_y": 1, + "options": { + "to": [ + "{{$trigger.email}}" + ], + "subject": "A Report Featuring Your Input is Ready", + "body": null, + "type": "template", + "template": "report-notification-en", + "data": { + "PARTICIPANT_BASE_URL": "{{$trigger.PARTICIPANT_BASE_URL}}", + "project_id": "{{$trigger.project_id}}", + "project_name": "{{$trigger.project_name}}", + "default_conversation_title": "{{$trigger.default_conversation_title}}", + "conversation_name": "{{$trigger.conversation_name}}", + "token": "{{$trigger.token}}" + }, + "replyTo": [ + "info@dembrane.com" + ] + }, + "resolve": null, + "reject": "a8493bf0-851d-443c-b8ed-1d38d79e5645", + "flow": "17703446-fef0-49e9-bdc4-385db1311137", + "_syncId": "922d6207-d0da-41d4-b7b2-4c570b13c19b" + }, { "name": "Send Email English", "key": "send_email_english", @@ -567,6 +1104,37 @@ "flow": "17703446-fef0-49e9-bdc4-385db1311137", "_syncId": "3dbf2ea1-17f8-4bde-aa89-43278fe9a00f" }, + { + "name": "Send Email English", + "key": "send_email_english", + "type": "mail", + "position_x": 39, + "position_y": 1, + "options": { + "to": [ + "{{$trigger.email}}" + ], + "subject": "A Report Featuring Your Input is Ready", + "body": null, + "type": "template", + "template": "report-notification-en", + "data": { + "PARTICIPANT_BASE_URL": "{{$trigger.PARTICIPANT_BASE_URL}}", + "project_id": "{{$trigger.project_id}}", + "project_name": "{{$trigger.project_name}}", + "default_conversation_title": "{{$trigger.default_conversation_title}}", + "conversation_name": "{{$trigger.conversation_name}}", + "token": "{{$trigger.token}}" + }, + "replyTo": [ + "info@dembrane.com" + ] + }, + "resolve": null, + "reject": "b4f25f50-6308-4992-ad55-b17f723b8d0d", + "flow": "17703446-fef0-49e9-bdc4-385db1311137", + "_syncId": "528ddb67-1a33-459b-88ac-e9851adfa470" + }, { "name": "Trigger Email Flow", "key": "trigger_email_flow", @@ -598,5 +1166,37 @@ "reject": null, "flow": "ec4e7ea5-72de-4365-b66f-d8f11b549495", "_syncId": "e101f00d-2fb8-4f40-9e0e-4d24da5bb1e9" + }, + { + "name": "Trigger Email Flow", + "key": "trigger_email_flow", + "type": "trigger", + "position_x": 109, + "position_y": 1, + "options": { + "flow": "17703446-fef0-49e9-bdc4-385db1311137", + "iterationMode": "serial", + "payload": "{{filter_emails}}" + }, + "resolve": null, + "reject": null, + "flow": "ec4e7ea5-72de-4365-b66f-d8f11b549495", + "_syncId": "64108c9f-d6bb-4141-8f9c-b023ff5d7549" + }, + { + "name": "Trigger Email Flow", + "key": "trigger_email_flow", + "type": "trigger", + "position_x": 109, + "position_y": 1, + "options": { + "flow": "17703446-fef0-49e9-bdc4-385db1311137", + "iterationMode": "serial", + "payload": "{{filter_emails}}" + }, + "resolve": null, + "reject": null, + "flow": "ec4e7ea5-72de-4365-b66f-d8f11b549495", + "_syncId": "18df11f6-d6d9-41f4-be23-4a759620864c" } ] diff --git a/echo/directus/sync/collections/permissions.json b/echo/directus/sync/collections/permissions.json index f9319c1e..0dbf1d42 100644 --- a/echo/directus/sync/collections/permissions.json +++ b/echo/directus/sync/collections/permissions.json @@ -2063,51 +2063,33 @@ "_syncId": "d8d2c4ee-2431-4ea2-8f22-c2b3f4a01014" }, { - "collection": "aspect_segment", - "action": "read", - "permissions": { - "_and": [ - { - "aspect": { - "view_id": { - "project_analysis_run_id": { - "project_id": { - "directus_user_id": { - "_eq": "$CURRENT_USER" - } - } - } - } - } - } - ] - }, + "collection": "aspect", + "action": "create", + "permissions": null, "validation": null, "presets": null, "fields": [ "*" ], "policy": "37a60e48-dd00-4867-af07-1fb22ac89078", - "_syncId": "9c4c00f9-1b2c-4642-a912-fa4bc4d1a054" + "_syncId": "e853e3bf-cba6-4ff2-99c8-2a9c23c0320e" + }, + { + "collection": "aspect", + "action": "delete", + "permissions": null, + "validation": null, + "presets": null, + "fields": [ + "*" + ], + "policy": "37a60e48-dd00-4867-af07-1fb22ac89078", + "_syncId": "69b438b8-3a23-4945-8fa2-ccb5ccf8b72e" }, { "collection": "aspect", "action": "read", - "permissions": { - "_and": [ - { - "view_id": { - "project_analysis_run_id": { - "project_id": { - "directus_user_id": { - "_eq": "$CURRENT_USER" - } - } - } - } - } - ] - }, + "permissions": null, "validation": null, "presets": null, "fields": [ @@ -2116,6 +2098,18 @@ "policy": "37a60e48-dd00-4867-af07-1fb22ac89078", "_syncId": "5f279729-e0c9-43bd-bb08-1ac7426ea4e2" }, + { + "collection": "aspect", + "action": "update", + "permissions": null, + "validation": null, + "presets": null, + "fields": [ + "*" + ], + "policy": "37a60e48-dd00-4867-af07-1fb22ac89078", + "_syncId": "df279954-aa99-47aa-ad0c-4986a6010734" + }, { "collection": "conversation_chunk", "action": "create", @@ -2212,39 +2206,6 @@ "policy": "37a60e48-dd00-4867-af07-1fb22ac89078", "_syncId": "4039c10b-4765-4d30-9992-9ab2b326a7bc" }, - { - "collection": "conversation_link", - "action": "read", - "permissions": { - "_and": [ - { - "_and": [ - { - "source_conversation_id": { - "project_id": { - "directus_user_id": { - "_eq": "$CURRENT_USER" - } - } - } - } - ] - } - ] - }, - "validation": null, - "presets": null, - "fields": [ - "id", - "date_updated", - "target_conversation_id", - "source_conversation_id", - "link_type", - "date_created" - ], - "policy": "37a60e48-dd00-4867-af07-1fb22ac89078", - "_syncId": "e209e43b-6a5b-42da-b383-6e9ec7590a2a" - }, { "collection": "conversation_project_tag", "action": "create", @@ -2395,7 +2356,7 @@ "date_created" ], "policy": "37a60e48-dd00-4867-af07-1fb22ac89078", - "_syncId": "6dcf040d-3975-4861-9530-3c2a9e0ec33a" + "_syncId": "217f5586-f8b7-414b-82b7-6d40212501a8" }, { "collection": "conversation_reply", @@ -2502,6 +2463,66 @@ "policy": "37a60e48-dd00-4867-af07-1fb22ac89078", "_syncId": "b35e076e-2e7c-4558-8ea7-8a1b19ac69b7" }, + { + "collection": "insight", + "action": "create", + "permissions": null, + "validation": null, + "presets": null, + "fields": [ + "*" + ], + "policy": "37a60e48-dd00-4867-af07-1fb22ac89078", + "_syncId": "e8cea976-f633-408b-8a0f-239dbda32105" + }, + { + "collection": "insight", + "action": "delete", + "permissions": null, + "validation": null, + "presets": null, + "fields": [ + "*" + ], + "policy": "37a60e48-dd00-4867-af07-1fb22ac89078", + "_syncId": "ad1a848a-bc9d-4e53-8094-90aa5864b3ff" + }, + { + "collection": "insight", + "action": "read", + "permissions": null, + "validation": null, + "presets": null, + "fields": [ + "*" + ], + "policy": "37a60e48-dd00-4867-af07-1fb22ac89078", + "_syncId": "007f024d-cbeb-46e8-b032-c7e358870026" + }, + { + "collection": "insight", + "action": "update", + "permissions": null, + "validation": null, + "presets": null, + "fields": [ + "*" + ], + "policy": "37a60e48-dd00-4867-af07-1fb22ac89078", + "_syncId": "bacd7a94-79d4-42cc-b4dd-bbca8d6a74f5" + }, + { + "collection": "processing_status", + "action": "read", + "permissions": null, + "validation": null, + "presets": null, + "fields": [ + "*" + ], + "policy": "37a60e48-dd00-4867-af07-1fb22ac89078", + "_syncId": "04689a5c-fd8e-43d3-808e-86b3a231c7e8" + }, { "collection": "project_analysis_run", "action": "create", @@ -3157,226 +3178,51 @@ }, { "collection": "view", - "action": "delete", - "permissions": { - "_and": [ - { - "project_analysis_run_id": { - "project_id": { - "directus_user_id": { - "_eq": "$CURRENT_USER" - } - } - } - } - ] - }, + "action": "create", + "permissions": null, "validation": null, "presets": null, "fields": [ "*" ], "policy": "37a60e48-dd00-4867-af07-1fb22ac89078", - "_syncId": "95ace34c-2d7e-4b63-8c22-0a4ce92a28f5" + "_syncId": "ec54eaac-1b2f-49fa-9a0f-4d1fa86050f2" }, { "collection": "view", - "action": "read", - "permissions": { - "_and": [ - { - "project_analysis_run_id": { - "project_id": { - "directus_user_id": { - "_eq": "$CURRENT_USER" - } - } - } - } - ] - }, + "action": "delete", + "permissions": null, "validation": null, "presets": null, "fields": [ "*" ], "policy": "37a60e48-dd00-4867-af07-1fb22ac89078", - "_syncId": "b9e92ecb-d92d-44bb-b7c2-802453104893" + "_syncId": "95ace34c-2d7e-4b63-8c22-0a4ce92a28f5" }, { - "collection": "conversation_reply", + "collection": "view", "action": "read", "permissions": null, "validation": null, "presets": null, "fields": [ - "id", - "content_text", - "reply", - "conversation_id", - "date_created", - "type" + "*" ], - "policy": "abf8a154-5b1c-4a46-ac9c-7300570f4f17", - "_syncId": "1d26957a-255b-4aa0-b4d9-1bc084211457" - }, - { - "collection": "directus_files", - "action": "read", - "permissions": { - "_and": [ - { - "_or": [ - { - "folder": { - "name": { - "_contains": "Public" - } - } - }, - { - "folder": { - "parent": { - "name": { - "_contains": "Public" - } - } - } - }, - { - "folder": { - "parent": { - "parent": { - "name": { - "_contains": "Public" - } - } - } - } - } - ] - } - ] - }, - "validation": null, - "presets": null, - "fields": [ - "description", - "id", - "title", - "tags", - "location", - "storage", - "focal_point_divider", - "focal_point_x", - "focal_point_y", - "storage_divider", - "filename_disk", - "filename_download", - "metadata", - "type", - "filesize", - "created_on", - "modified_by", - "modified_on", - "embed", - "uploaded_by", - "uploaded_on", - "folder", - "width", - "height", - "charset", - "duration", - "tus_id", - "$thumbnail", - "tus_data" - ], - "policy": "abf8a154-5b1c-4a46-ac9c-7300570f4f17", - "_syncId": "996d6fa1-0ec8-4f52-8627-77b3648e065e" + "policy": "37a60e48-dd00-4867-af07-1fb22ac89078", + "_syncId": "b9e92ecb-d92d-44bb-b7c2-802453104893" }, { - "collection": "project_report_metric", - "action": "create", + "collection": "view", + "action": "update", "permissions": null, - "validation": { - "_and": [ - { - "project_report_id": { - "_nnull": true - } - }, - { - "type": { - "_eq": "view" - } - } - ] - }, - "presets": null, - "fields": [ - "id", - "type", - "project_report_id", - "date_created", - "date_updated", - "ip" - ], - "policy": "abf8a154-5b1c-4a46-ac9c-7300570f4f17", - "_syncId": "634d73dd-3bdc-4edf-8be3-2f01c9956725" - }, - { - "collection": "project_report_metric", - "action": "read", - "permissions": { - "_and": [ - { - "project_report_id": { - "project_id": { - "_nnull": true - } - } - } - ] - }, - "validation": null, - "presets": null, - "fields": [ - "type", - "date_updated", - "id", - "date_created", - "project_report_id" - ], - "policy": "abf8a154-5b1c-4a46-ac9c-7300570f4f17", - "_syncId": "50549508-2da8-4123-ab2c-1d3414061464" - }, - { - "collection": "project_report", - "action": "read", - "permissions": { - "_and": [ - { - "status": { - "_eq": "published" - } - } - ] - }, "validation": null, "presets": null, "fields": [ - "status", - "id", - "date_created", - "content", - "language", - "project_id", - "show_portal_link", - "date_updated", - "error_code" + "*" ], - "policy": "abf8a154-5b1c-4a46-ac9c-7300570f4f17", - "_syncId": "8a8e0d56-e394-47af-8473-9c77b6a0870f" + "policy": "37a60e48-dd00-4867-af07-1fb22ac89078", + "_syncId": "0f9edf9d-2231-4119-a604-f8be69d0c4c1" }, { "collection": "aspect", diff --git a/echo/directus/sync/collections/policies.json b/echo/directus/sync/collections/policies.json index c7d03e4d..367e9169 100644 --- a/echo/directus/sync/collections/policies.json +++ b/echo/directus/sync/collections/policies.json @@ -34,7 +34,7 @@ { "name": "Application User", "icon": "supervised_user_circle", - "description": "MASTER POLICY", + "description": null, "ip_access": null, "enforce_tfa": false, "admin_access": false, @@ -50,7 +50,7 @@ { "name": "Basic User", "icon": "sports_baseball", - "description": "THIS CONTAINS EVERYTHING - ASSIGN THIS TO A USER", + "description": "Scoped to projects", "ip_access": null, "enforce_tfa": false, "admin_access": false, @@ -64,20 +64,15 @@ "_syncId": "37a60e48-dd00-4867-af07-1fb22ac89078" }, { - "name": "$t:public_label", - "icon": "public", - "description": "$t:public_description", + "name": "public_label", + "icon": "badge", + "description": null, "ip_access": null, "enforce_tfa": false, "admin_access": false, "app_access": false, - "roles": [ - { - "role": null, - "sort": 1 - } - ], - "_syncId": "abf8a154-5b1c-4a46-ac9c-7300570f4f17" + "roles": [], + "_syncId": "b8d33fbd-8a91-4960-a2c1-29f0554c9efd" }, { "name": "Read Only - everything", diff --git a/echo/directus/sync/snapshot/fields/aspect/rank.json b/echo/directus/sync/snapshot/fields/aspect/rank.json new file mode 100644 index 00000000..91ed82b8 --- /dev/null +++ b/echo/directus/sync/snapshot/fields/aspect/rank.json @@ -0,0 +1,43 @@ +{ + "collection": "aspect", + "field": "rank", + "type": "integer", + "meta": { + "collection": "aspect", + "conditions": null, + "display": null, + "display_options": null, + "field": "rank", + "group": null, + "hidden": false, + "interface": "input", + "note": null, + "options": null, + "readonly": false, + "required": false, + "sort": 11, + "special": null, + "translations": null, + "validation": null, + "validation_message": null, + "width": "full" + }, + "schema": { + "name": "rank", + "table": "aspect", + "data_type": "integer", + "default_value": null, + "max_length": null, + "numeric_precision": 32, + "numeric_scale": 0, + "is_nullable": true, + "is_unique": false, + "is_indexed": false, + "is_primary_key": false, + "is_generated": false, + "generation_expression": null, + "has_auto_increment": false, + "foreign_key_table": null, + "foreign_key_column": null + } +}